Demand Loading on Context Menu Invocation

If your application defines custom object context menus, you can provide registry settings to guarantee that the required modules are loaded when the user right-clicks on one of your objects. To do so, add a key to the ContextHandlers registry section. On a power user's machine, the ContextHandlers hive appears at the following registry location:

\\HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AutoCAD\R24.1\
    ACAD-5101:409\
        ContextHandlers

The name of the key should be your custom object class name. The value of the key should be a comma-delimited list of logical names of the applications that need to be loaded. These logical names must match ApplicationName keys that exist in the Applications registry hive, as described in Creating AutoCAD Subkeys and Values.

The following sample illustrates a ContextHandler key for AcDbTable objects:

\\HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\AutoCAD\R24.1\
    ACAD-5101:409\
        ContextHandlers\
           AcDbTable:REG_SZ:AcadTable,AcSmSheetList

When a user right-clicks on an AcDbTable object, this key guarantees that the modules associated with logical names AcadTable and AcSmSheetList are loaded.