To Debug a CAD Standards Plug-in (ActiveX/CSP)

  1. In Microsoft Visual Studio, click Project menu <Project> Properties.
  2. In the Properties dialog, click the References tab.
    1. Click Reference Paths.
    2. In the Reference Paths dialog box, click [...] to the right of the Folder text box.
    3. In the Select Reference Path dialog box, browse to and select the inc-<platform> folder. Click OK.
      Note: Substitute <platform> with win32 or x64 based on the target Windows platform; 32-bit or 64-bit.

      By default inc-win32 and inc-x64 folders are located under <drive>:\ObjectARX <version>.

      Note: Substitute <drive> and <version> with the drive letter in which the ObjectARX SDK is installed and the version you are building the application against.
    4. Click Add Folder and then click OK.
  3. In the Properties dialog, click the Debug tab.
    1. Click Start External Program and click [...] to the right of the text box.
    2. In the Select File dialog box, browse to and select acad.exe. Click Open.

      By default, the acad.exe file is located under one of the following locations based on the release installed:

      • C:\Program Files\AutoCAD <release>
      • C:\Program Files\Autodesk\AutoCAD <release>
  4. Register the plug-in with the Windows Registry using a REG file.
  5. In Microsoft Visual Studio, in the code editor window, set the breakpoints where you want execution to be interrupted.
    Remember: The Initialize method is the entry point of a CAD Standards plug-in.
  6. Click Debug menu Start Debugging.
  7. In AutoCAD, open the drawing file to check.
  8. Configure the drawing standards, do one of the following:
    • On the ribbon, Manage tab CAD Standards panel Configure.
    • At the Command prompt, enter standards.
  9. In the Configure Standards dialog box, Standards tab, click Add and select the drawing standards (DWS) files to use.
  10. On the Plug-ins tab, enable the use of the custom CAD Standard plug-in.
  11. Save the drawing file before starting the CAD standards checking process.
  12. Click Check Standards to start checking the drawing.

    In Microsoft Visual Studio, execution pauses at the first breakpoint.