Set the Project Options
 
 
 

There are three options that can be set for AutoCAD VBA projects:

Enable Auto Embedding

The auto embed feature automatically creates an embedded VBA project for all drawings when the drawing is opened.

Allow Break on Errors

This option allows VBA to enter Break mode when an error is encountered. Break mode is a temporary suspension of program execution in the interactive development environment. In Break mode, you can examine, debug, reset, step through, or continue program execution.

When this option is enabled, unhandled errors found during the execution of a VBA macro will suspend the execution of the macro and display the VBA IDE at the point of the error in the macro.

When this option is disabled, untrapped errors found during the execution of a VBA macro will display a message box alerting you to the error, and then end execution of the macro.

Enable Macro Virus Protection

The virus protection mechanism displays a built-in warning message whenever you open a drawing that may contain macro viruses.

To set the AutoCAD VBA project options

  1. From the Tools menu choose Macro Macros to open the VBA Macros dialog box.
  2. From the VBA Macros dialog box, choose Options to open the Options dialog box.
  3. From the Options dialog box, select the options you want to enable.
  4. Choose OK.