Share
 
 

About Sample Code (ActiveX)

The ActiveX Developer and Reference topics contain over 800 example VBA subroutines and AutoLISP programs that demonstrate the usage of ActiveX methods, properties, and events.

Example code in the ActiveX Developer and Reference topics can be copied from the Help topics, pasted directly into the AutoCAD VBA environment or an AutoLISP Source (LSP) file, and then executed with one requirement: the current active drawing in AutoCAD must be a blank drawing open to model space.

Note: AutoCAD LT doesn't support Visual Basic for Applications (VBA) programming, but ActiveX can be used with the AutoLISP programming language in AutoCAD and AutoCAD LT.

VBA Sample Applications (AutoCAD Only)

There are also many sample VBA applications provided in the AutoCAD Sample directory. These sample applications show a wide range of functionality, 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.

Was this information helpful?