Overrules are internally managed by pairs of target class and overrule which are registered and unregistered at runtime.
Activate an overrule for a target class by registering your derived overrule with the following AcRxOverrule function:
static ACDB_PORT Acad::ErrorStatus addOverrule( AcRxClass* pClass, AcRxOverrule* pOverrule, bool bAddAtLast = false );
Deactivate an overrule for a target class by unregistering your derived overrule with the following AcRxOverrule function:
static ACDB_PORT Acad::ErrorStatus removeOverrule( AcRxClass* pClass, AcRxOverrule* pOverrule );
Any number of overrules can be registered for a target class. When registering an overrule with addOverrule(), you can specify whether the given overrule-class pair is to be added to the end of the list.
The overrule mechanism can be switched on and off application-wide with the following AcRxOverrule function:
static ACDB_PORT void setIsOverruling( bool bIsOverruling );
You can determine whether the overrule mechanism is switched on or off with the following AcRxOverrule function:
static ACDB_PORT bool isOverruling();
You can determine whether a given object is the target of a registered overrule with the following function:
static ACDB_PORT bool hasOverrule( const AcRxObject* pSubject, AcRxClass* pOverruleClass );