Close

Relief for ODA Team in Ukraine

Learn more
ODA Drawings SDK
Creating a Subclass of OdRxModule

To create a custom extension module, create a subclass of OdRxModule. A custom module should contain exactly one subclass of OdRxModule, but can define any number of custom objects.


class CustomObjectsModule : public OdRxModule
{
protected:
  void initApp()
  {
    // register the custom object types defined in this module
    ExCustObject::rxInit();
    ExCustEntity::rxInit();
    ExSphere::rxInit();
    // custom commands can be registered here
  }
  void uninitApp()
  {
    // unregister the custom object types defined in this module
    ExSphere::rxUninit();
    ExCustEntity::rxUninit();
    ExCustObject::rxUninit();
    // remove custom commands here
  }
};

// macro that defines the entry point for this library
ODRX_DEFINE_DYNAMIC_MODULE(CustomObjectsModule);

See Also

Creating an Custom Application

Copyright © 2002 – 2022. Open Design Alliance. All rights reserved.