AutoCAD VBA Programming: Tools and Techniques

From the application object a program can control several aspects of AutoCAD, including the loading and unloading of other drawings, ARX modules, and control elements of the Windows display screen as related to the AutoCAD application object.
Let's take a look at some of the methods and properties of the application object. Remember that at this level we are controlling the AutoCAD application, and many of the changes will be reflected in all documents that are currently attached (open) to the application.
| Method n | What it does |
|---|---|
| GetInterfaceObject | Connects to other ActiveX servers. Given a name of the server such as AutoCAD Application, this method will return a pointer to the application object of interfaced application. |
| ListARX | Provides ARX application support from VBA. |
| LoadARX UnloadARX | A program can load and unload ARX modules as well as check a list to see exactly which ARX modules are currently loaded. |
| RunMacro | Runs a VBA macro. Can be used to load and run another VBA project from within the current project. |
| Quit | Exists the drawing and drawing editor. This function will run properly only when the operator is not in the middle of another command. |
| StartUndoMark EndUndoMark | Groups operations by setting undo markers in the active drawing. The AutoCAD undo mechanism will treat all operations that occur between the two function calls as a single operation. |
| Update | Updates the object on the display. This method can be used with a singular entity object or applied to the entire drawing. It... |