The AcRxDynPropMgr class automates Property Manager registration. This class is used internally by the AcRxArxApp class to map dynamic property classes to AcRxClass instances. Because the class is fully implemented in its declaration, you need to create only an instance of it. If your application uses AcRxArxApp to implement its acrxEntryPoint() function, a global AcRxDynPropMgr object is provided.
ObjectARX applications that do not use AcRxArxApp may use AcRxDynPropMgr by dynamically instantiating it in the acrxEntryPoint() method's AcRx::kInitAppMsg case, and deleting it in the AcRx::kUnloadAppMsg case. This technique is demonstrated in the following code:
AcRxDynPropManager *pDynPropManager =NULL ; // MDI safe extern "C" AcRx::AppRetCode acrxEntryPoint (AcRx::AppMsgCode msg, void *pkt) { switch ( msg ) { case AcRx::kInitAppMsg: acrxDynamicLinker->unlockApplication (pkt) ; acrxDynamicLinker->registerAppMDIAware (pkt) ; pDynPropManager =new AcRxDynPropManager ; break ; case AcRx::kUnloadAppMsg: delete pDynPropManager ; pDynPropManager =NULL ; break ; } return (AcRx::kRetOK) ; }
The AcRxDynPropMgr object uses the OPM_DYNPROP_OBJECT_ENTRY_AUTO macro to discover how your dynamic property class names map to AcRxClass names. You call this macro once for each mapping you wish to provide. The following example maps the CMyDynProp class to both AcDbLine and AcDbCircle:
OPM_DYNPROP_OBJECT_ENTRY_AUTO(CMyDynProp, AcDbLine) OPM_DYNPROP_OBJECT_ENTRY_AUTO(CMyDynProp, AcDbCircle)
These macro calls should appear in the dynamic property class header file after the class declaration.