Use the Macros Dialog Box

AutoCAD ActiveX

 
Use the Macros Dialog Box
 
 
 

The Macros dialog box allows you to run, edit, delete, and create macros as well as set the VBA project options. Open the Macros dialog box from the AutoCAD Tools menu by choosing Macro Macros, or issue VBARUN at the AutoCAD Command prompt.

The names of all macros in the valid range are displayed in this dialog box. You can change the valid range by using the Macros In drop-down list. This list specifies the projects or drawings whose macros are displayed. You can choose to display the macros in

  • All drawings and projects
  • All drawings
  • All projects
  • Any individual drawing currently open in AutoCAD
  • Any individual project currently loaded in AutoCAD

By limiting the valid range you can control how many macro names appear in the list. This will help you in the cases when many macros are available in the loaded drawings and projects.

To create a new macro

  1. Open the Macros dialog box and enter the name for the new macro.
  2. In the Macros In drop-down list, select a project to create the new macro in.
  3. Choose Create.

If a macro with the specified name already exists, you will be asked if you want to replace the existing macro.

If you select Yes at the prompt, the code in the existing macro will be deleted and a new, empty macro will be created with the specified name.

If you select No at the prompt, you will be returned to the Macros dialog box to enter a new name for the macro.

If you select Cancel at the prompt, the Macros dialog box will be dismissed and no new macro will be created.

To delete a macro

  1. Open the Macros dialog box and select the macro to delete.
  2. Choose Delete. You will be prompted to confirm the delete.
  3. At the prompt, choose Yes to delete the macro, or No to cancel the delete.