Object Type ID

The numeric object type ID uniquely identifies every object type in enaio® (folders, registers, documents, portfolios, notes). In the API it appears, among others, as the parameter objecttypeid (e.g., mng.ExportSecuritySystem), as the XML attribute id on <ObjectType> (DMSContent, DMSData documents), as the return value ObjectType from dms.GetObjectTypeByID, and as the attribute object_type in security system XML structures.

1. Computation

The object type ID is composed of two 16-bit parts:

objecttypeid = (maintype << 16) | cotype
  • maintype — Highword (upper 16 bits): classifies the broad kind of object type.

  • cotype — Lowword (lower 16 bits): running subtype index within the class, starting at 0.

Both parts can be recovered from a given object type ID:

maintype = (objecttypeid >> 16) & 0xFFFF
cotype   =  objecttypeid        & 0xFFFF

2. Main Types (maintype)

Object Type maintype (dec) maintype (hex) cotype Range

Folder

0

0x0000

>= 0

Document — Grayscale

1

0x0001

>= 0

Document — Black/White

2

0x0002

>= 0

Document — Color

3

0x0003

>= 0

Document — Windows

4

0x0004

>= 0

Document — Multimedia

5

0x0005

>= 0

Document — E-Mail

6

0x0006

>= 0

Document — XML

7

0x0007

>= 0

Document — Container

8

0x0008

>= 0

Register

99

0x0063

>= 0

Typeless document in user tray

200

0x00C8

17 (document main type)

Typeless document in workflow tray

300

0x012C

17 (document main type)

Portfolio

203

0x00CB

0

Note

32767

0x7FFF

14

3. Examples

objecttypeid maintype cotype Meaning

0

0

0

First cabinet folder

1

0

1

Second cabinet folder

262144 (0x040000)

4

0

First Windows document

262145 (0x040001)

4

1

Second Windows document

6488064 (0x630000)

99

0

First register

6488067 (0x630003)

99

3

Fourth register / subregister

4. Runtime Resolution

At runtime an object type ID can be resolved against the object definition:

  • dms.GetObjectTypeByID returns the ObjectType directly for an object ID.

  • dms.GetObjDef returns the full object definition with cabinets, object types and fields. From it the internal name, display name and underlying database table can be derived for a given object type ID.

The XSD schemas in DMSObjDef and DMSContent describe the maintype/cotype attributes at the XML level.