Run a Macro

AutoCAD ActiveX

 
Run a Macro
 
 
 

Running a macro executes the macro code within the context of the current AutoCAD session. The current active drawing is considered to be the open drawing that has the focus when macro execution begins. All VBA references to the ThisDrawing object will refer to the current active drawing for macros in global projects. For macros in embedded projects, the ThisDrawing object always refers to the drawing in which the macro is embedded.

To run a macro from the Macros dialog box

  1. Open the Macros dialog box and select the macro to run.
  2. Choose Run.

To run a macro from the VBA IDE

  • From the Run menu, use the Run Macro menu option.

    If no macro or form is current, a dialog box is displayed, allowing you to choose the macro to run.

    If a given macro is current (the cursor is in a procedure), that macro will be executed.