This manual and the ActiveX and VBA Reference together contain over 800 example VBA subroutines that demonstrate the usage of ActiveX methods, properties, and events.
There are also many sample applications provided in the AutoCAD Sample directory. These sample applications show a wide range of fuctionality, from extracting AutoCAD drawing data into Microsoft Excel spreadsheets to drawing and performing stress analysis on an electrical transmission tower.
These samples also show how to combine the versatility of the Visual Basic for Applications programming environment with the power of the AutoCAD ActiveX interface to create customized applications.
Additionally, example code in the ActiveX and VBA Developer's Guide and ActiveX and VBA Reference can be copied from the Help files, pasted directly into the AutoCAD VBA environment, and then executed with one requirement: the current active drawing in AutoCAD must be a blank drawing open to model space.
To run the examples from the Help files
More information on running macros and the Macros dialog box is available in the topic “Run a Macro.â€