The Wayback Machine - https://web.archive.org/web/20100503094147/http://www.cambridgesoft.com:80/services/documentation/sdk/chemdraw/cdx/DataType/CDXNumeric.htm

CDX Numeric Data Types

INT8, UINT8, INT16, UINT16, INT32, UINT32:

Signed and unsigned integers of 8-, 16-, or 32-bit size are commonly used as the values of CDX attributes.

In CDX files, byte order is Windows byte order (little-endian).

In practice, the size of an integer value in a CDX file is self-documenting since every CDX value is prefixed by the size of that value, in bytes. An integer value stored in 1 byte must be an INT8 (or UNIT8); a similar value stored in 2 bytes must be an INT16 (or UINT16), and when stored in 4 bytes it must be an INT32 (or UINT32). A flexible CDX file format interpreter should not be hardcoded to expect, for example, an INT16 value in a given field. Rather, it should look at the size of the field and treat the value as an INT8, INT16, or IN32 as appropriate. Under no circumstances should the interpreter read past the end of a field that is shorter than expected, nor should it ever start reading the next attribute too early if the previous attribute is longer than expected.

ChemDraw itself is flexible in reading the size of integer values in CDX files as described above. However, programs that produce CDX files should try to honor the data types described in this specification, so that those CDX files can be read by other programs that might not be flexible.

In CDXML files, integers are written as an alphanumeric string representing the number.

Note also that some properties that are stored as a numeric value in CDX files are instead stored as an enumerated type (using an alphanumeric string) in CDXML files.

FLOAT64:

Unsigned floating-point value of 64-bit size, corresponding to a double value.

In CDX files, byte order is Windows byte order (little-endian). Floating-point numbers are written in CDXML files as an alphanumeric string representing the number.

Examples:

Data TypeValueCDXCDXML
INT8
-1
0
10
127
:
:
:
:
FF
00
0A
7F
"-1"
"0"
"10"
"127"
UINT8
0
10
127
255
:
:
:
:
00
0A
7F
FF
"0"
"10"
"127"
"255"
INT16
-1
0
10
255
256
1000
32767
:
:
:
:
:
:
:
FF FF
00 00
0A 00
FF 00
00 01
E8 03
FF 7F
"-1"
"0"
"10"
"255"
"256"
"1000"
"32767"
UINT16
0
10
255
256
1000
32767
65535
:
:
:
:
:
:
:
00 00
0A 00
FF 00
00 01
E8 03
FF 7F
FF FF
"0"
"10"
"255"
"256"
"1000"
"32767"
"65535"
INT32
-1
0
10
255
256
1000
100000
2147483647
:
:
:
:
:
:
:
:
FF FF FF FF
00 00 00 00
0A 00 00 00
FF 00 00 00
00 01 00 00
E8 03 00 00
A0 86 01 00
FF FF FF 7F
"-1"
"0"
"10"
"255"
"256"
"1000"
"100000"
"2147483647"
UINT32
0
10
255
256
1000
100000
4294967295
:
:
:
:
:
:
:
00 00 00 00
0A 00 00 00
FF 00 00 00
00 01 00 00
E8 03 00 00
A0 86 01 00
FF FF FF FF
"0"
"10"
"255"
"256"
"1000"
"100000"
"4294967295"
FLOAT64
0.0
10.0
255.0
256.0
1000.0
100000.0
0.5
0.001
-123.45
:
:
:
:
:
:
:
:
:
00 00 00 00 00 00 00 00
00 00 00 00 00 00 24 40
00 00 00 00 00 E0 6F 40
00 00 00 00 00 00 70 40
00 00 00 00 00 40 8F 40
00 00 00 00 00 6A F8 40
00 00 00 00 00 00 E0 3F
FC A9 F1 D2 4D 62 50 3F
CD CC CC CC CC DC 5E C0
"0"
"10"
"255"
"256"
"1000"
"100000"
"0.5"
"0.001"
"-123.45"

 

See the complete list of CDX data types

 


CDX Documentation index