Version Custom Objects

Level

Recommendation

Applies to

ObjectARX and ObjectDBX modules

The version of an object should be filed with the DWG file and reinstated correctly when it is read. A new version number should be used each time the definition of an object is created by adding additional parameters. Versioning an object allows your object enabler to correctly identify and handle older versions of the custom object saved in a DWG file.

See the example code in the 'Sample Code for dwgOutFields()' topic of the ObjectARX Developer’s Guide.

// Object Version - must always be the first item.
//
Adesk::Int16 version = VERSION;
filer->writeItem(version);