There are three options that can be set for AutoCAD VBA projects:
- Enable Auto Embedding
- Allow Break on Errors
- Enable Macro Virus Protection
The auto embed feature automatically creates an embedded VBA project for all drawings when the drawing is opened.
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.
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
- From the Tools menu choose Macro Macros to open the VBA Macros dialog box.
- From the VBA Macros dialog box, choose Options to open the Options dialog box.
- From the Options dialog box, select the options you want to enable.
- Choose OK.