Explains how to run ActiveX sample code that is part of the AutoCAD Help system.
Running AutoLISP Samples
- Create a new or open an existing AutoLISP Source (LSP) file.
- In the open editor window, enter the following statement:
(vl-load-com)
- On a new line in the editor window, copy and paste the example code from the Help topic.
- Save the changes to the LSP file.
- On the ribbon, click Manage tab
Applications panel
Load Application.
- In the Load/Unload Applications dialog box, browse to and select the LSP file to load. Click Load and then click Close.
- 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.
- On the ribbon, click Manage tab
Applications panel
Visual Basic Editor.
- Copy the example code from the Help topic, and paste it into an empty VBA code module or the ThisDrawing class module.
- Verify that AutoCAD has a blank drawing open to model space.
- At the AutoCAD Command prompt, enter vbaman.
- In the Macros dialog box, choose the macro and click Run.