Implementing Class Versioning

  1. If you are deriving a class from any ObjectARX built-in classes, except for AcDbObject and AcDbEntity, call setHasSaveVersionOverride(true) in the constructor so that the AcDbObject::getObjectSaveVersion() default implementation knows to not just return the filer version, but to instead check with your class version and return an appropriate “object save version” according to the rules described above. getObjectSaveVersion() doesn't do so unless this bit is set.
  2. You can override AcDbObject::getObjectSaveVersion() to specify which version the object data needs to be stored in. There is no need to supermessage because you are completely taking over.
  3. Do not use filer->dwgVersion() in your dwgInFields(), dwgOutFields(), dxfInFields(), or dxfOutFields() methods. Use self()‑>getObjectSaveVersion() instead. Its default implementation is to return filer->dwgVersion() unless the object wants to override the save version.

    If you use filer->dwgVersion(), you're disabling proper filer selection for the classes derived from yours.

  4. Be sure to register your classes using ACRX_DXF_DEFINE_MEMBERS in AutoCAD 2000 and later with a “birth version” using the two new arguments. Remember that birth version means the version of AutoCAD in which the class was introduced.