To Run the Examples from the AutoCAD Help System (ActiveX)

Explains how to run ActiveX sample code that is part of the AutoCAD Help system.

Running AutoLISP Samples

  1. Create a new or open an existing AutoLISP Source (LSP) file.
  2. In the open editor window, enter the following statement:
    (vl-load-com)
  3. On a new line in the editor window, copy and paste the example code from the Help topic.
  4. Save the changes to the LSP file.
  5. On the ribbon, click Manage tab Applications panel Load Application.
  6. In the Load/Unload Applications dialog box, browse to and select the LSP file to load. Click Load and then click Close.
  7. At the AutoCAD Command prompt, enter the name of the command defined by the example code.

Running VBA Samples (AutoCAD Only)

Note: AutoCAD LT doesn't support Visual Basic for Applications (VBA) programming.
  1. On the ribbon, click Manage tab Applications panel Visual Basic Editor.
  2. Copy the example code from the Help topic, and paste it into an empty VBA code module or the ThisDrawing class module.
  3. Verify that AutoCAD has a blank drawing open to model space.
  4. At the AutoCAD Command prompt, enter vbaman.
  5. In the Macros dialog box, choose the macro and click Run.