Autodesk AutoCAD Services & Support

VBA projects embedded in drawing files create potential macro virus risk

Issue

You want to know what potential macro virus risk is created by VBA projects embedded in drawing files and how you can guard against the risk.

Solution

This solution assesses the potential macro virus risk created by VBA projects embedded in drawing files. The solution also discusses what you can do to guard against this risk. The information is presented in FAQ format.

Can a macro virus be embedded in a drawing file?

Yes. A macro virus is a computer virus stored in a macro. Therefore, it is possible that this type of virus can be stored in the macros of a VBA project. This creates the potential for an individual to include a macro virus in a drawing, because VBA projects can be embedded in AutoCAD® DWG files.  

Can you transmit a macro virus to a computer just by opening a drawing on that computer?

Yes. Whenever you open a drawing or project file that contains macros, you could activate a macro virus and transmit it to the computer.  

Does AutoCAD have any mechanisms to guard against macro viruses, such as a virus checker?

Yes. AutoCAD includes a virus protection mechanism for VBA macros, which reduces the risk of infecting a computer with a virus embedded in a drawing file.

Note: AutoCAD does not have a virus checker that you can use to check for macro viruses in VBA projects embedded in DWG files.

Although the virus protection mechanism for VBA macros is enabled by default, you can use the following procedure to ensure that protection is enabled:  

  1. On the Tools menu, click Macro > Macros.
  2. In the Macros dialog box, click Options.
  3. In the Options dialog box, select the Enable Macro Virus Protection option, and click OK.
  4. Click Close to close the Macros dialog box.  

When you open a drawing in AutoCAD with protection enabled, the program detects if a VBA project is embedded in the file. If there is a VBA project in the file, a warning dialog box is displayed that gives you the option to disable or enable macros, or not to load embedded macros at all. The following options are available in the warning dialog box :

  • Disable Macros. Loads the drawing or project file with the macros disabled. Click the Disable Macros option if you do not know for certain that the drawing came from a legitimate and reliable source. Note: You cannot run any macros after you choose the Disable Macros option. However, you can still view, edit, and save the macros. If you then want to run the macros, you need to close the file, and reopen it with macros enabled.
  • Enable Macros. Loads the drawing or project file with the macros enabled. Click the Enable Macros option, only if you know that the drawing or project file came from a legitimate and reliable source.
  • Do Not Load. If you are loading a project file, the process is canceled and the project file is not loaded. If you are opening an AutoCAD drawing with an embedded project, the drawing is opened with the macros disabled.

What can you do to reduce the risk of infecting a computer with a macro virus in a drawing file?

Use the following guidelines to minimize the risk of infecting a computer with a macro virus in a drawing file:

  • Always work with the virus protection mechanism for VBA macros in AutoCAD enabled.
  • Verify that drawings supplied to you are from a legitimate and reliable source.
  • If you are in any doubt about the macros in a drawing file, disable macros when you open the file. You can then view the macros and verify if they are safe to use.

 


Support – Terms of Use
  • Did this page resolve your issue?
  • Translate This Page (Beta)

    Learn More about this translation beta.Page is machine translated. Learn More.

    Was this translation useful?

  • Document Information

    Published date: 2005-Mar-14
    ID: TS23075

     

    Applies to:
    AutoCAD® 2007
    AutoCAD® 2006
    AutoCAD® 2005
    AutoCAD® 2004
    AutoCAD® 2002
    AutoCAD® 2000i
    AutoCAD® 2000