Register the Plug-in DLL with Windows
A CAD Standards plug-in DLL must be registered with Windows before it can be used by the CAD Standards framework. The regasm.exe application is used to register a DLL with Windows and generate a Registry (REG) file that be used as part of an installer to register a DLL. The regasm.exe application is part of the .NET Framework.
- On the Start menu, click [All] Programs
Accessories
Command Prompt.
- In the Command Prompt window, enter one of the following based on the latest version of the .NET Framework installed on the workstation and press Enter:
-
"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\RegAsm.exe" /codebase /regfile:<COM_RegFilename> <DLL_Fflename>
-
"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" /codebase /regfile:<COM_RegFilename> <DLL_Fflename>
Note: The values
<COM_RegFilename> and
<DLL_Fflename> represents the path and filenames of the Registry (REG) file to create that contains the entries necessary to register the CAD Standards plug-in DLL. For example, you might enter the following to create a REG file named
MyLayersPlugin.reg that can be used to register a DLL named
MyLayersPlugin.dll in the
CAD Plug-ins folder:
"C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\RegAsm.exe" /codebase /regfile:"C:\CAD Plug-ins\MyLayersPlugin.reg" "C:\CAD Plug-ins\MyLayersPlugin.dll"
Register the Plug-in DLL with the AutoCAD CAD Standards Framework
After a CAD Standards plug-in DLL is registered with Windows, the CAD Standards plug-in DLL must also be registered with the CAD Standards framework. You register a CAD Standards plug-in DLL with the CAD Standards framework by adding the programmatic identifier (ProgId) of the plug-in to the following key in the Windows Registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\Drawing Check\Plugins2
- On the Start menu, click [All] Programs
Accessories
Notepad.
- In Notepad, type the following:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk\Drawing Check\Plugins2\<Plug-in_ProgId>]
@=<Component>
Note: The value <Plug-in_ProgId> represents the ProgId of the CAD Standards plug-in. For example, you would enter MyPlugins.ABCLayers to register a DLL with the ProgId of MyPlugins.ABCLayers. The ProgId is added before the class that inherits from the IAcStPlugin2 interface. The value <Component> represents a descriptive value for the CAD Standards plug-in the registry, this value is typically the second part or component name of the ProgId. For example, you might enter "ABCLayers" if the ProgId of the CAD Standards plug-in is MyPlugins.ABCLayers.
- Click File menu
Save As, and then select All Files from the Save As Type drop-down list. Enter a file name for the REG file and type .reg after the file name.
- Click Save.