Using an Object Reactor

With the object reactor mechanism, you can define dependencies in a database that are preserved when the database is saved and are re-created whenever it is reinstantiated.

To cause one database object to react to another database object

  1. Derive a class from AcDbObject (or any of its subclasses).
  2. Implement the notification functions.
  3. Instantiate an object of the class.
  4. Add the object to the database and assign an owner.
  5. Add it to the notifier object with the AcDbObject::addPersistentReactor() function.

Use the ObjectARX macros when you derive the new object reactor class so that a class descriptor object is created for it. (If you don't use the ObjectARX macros, your class will inherit the class description of its parent when it is saved, and its identity will be lost when the file is read in.)