AutoCAD Services & Support

VBA support in AutoCAD 2010

Published date: 2009-Mar-24
ID: TS1105147

Applies to:
AutoCAD® 2010

Issue

You want to know if AutoCAD® 2010 still supports VBA.

Solution

Autodesk has begun the transition of VB customization from VBA to .NET technology. Currently, VBA is still supported in Autodesk products. However, starting with AutoCAD 2010, VBA is no longer part of the default AutoCAD installation and must be downloaded and installed separately. If you utilize VBA macros in your work environment, they will no longer work unless the VBA module is installed on your system. 

When you run a command that requires VBA, a message dialog box will be displayed stating that VBA is no longer installed with AutoCAD and directing you to a website where you can download the VBA module. Autodesk is making the VBA module available for download at the following location:

http://www.autodesk.com/vba-download

VBA components posted on this website will be available for all languages that AutoCAD and industry-specific versions of AutoCAD support.

To deploy the VBA download in an enterprise environment, you must download and extract the VBA Enabler and then run the following script:

' <script_begin>----------------------------------------------------------------

' Scripted installation for VBA Enabler

option explicit

 

' define variables

dim shell

dim productType

dim strInstallLevel

dim strSourcePath

 

' Script initialization

Set shell = CreateObject("WScript.Shell")

 

productType = "BonusPack"

strInstallLevel=5      ' 5 installs everything, 3 installs typical

'

' Source to install from (e.g. Z:\install\Autodesk\ AcVbaInstallerInstall \CDROM1)

strSourcePath = "C:\Autodesk\AutoCAD_2010_VBA_Enabler_Install_Image\CDROM1"

'

RunStandaloneInstall()

Wscript.quit()

 

'

Function RunStandaloneInstall

   shell.run DefaultCommand(),2,1

end function

'

Function DefaultCommand

   dim retString

' /q for silent install ' /c [key] override parameters for the key

   retString = """" & strSourcePath & "\setup.exe " & """" & " /t /q /c " & productType & ": "

   retString = retString & "InstallLevel=" & strInstallLevel 

   DefaultCommand = retString

end function

'

 

' </script_end>----------------------------------------------------------------

Autodesk is evaluating how long VBA will be supported in Autodesk products in the future. Though supported in the AutoCAD 2010-based products, it may or may not be supported in future releases. Therefore, it is strongly recommended that VB developers develop all new code using VB .NET.


Give us your feedback on this document:
 Resolved my issue.
 Helpful but incomplete.
 Difficult to find.
 Difficult to understand.
 Did not resolve my issue.
 Document contains broken links and references.
 No comment.
 

AUTODESK DOES NOT GUARANTEE THAT YOU WILL BE ABLE TO SUCCESSFULLY DOWNLOAD OR IMPLEMENT ANY SERVICE PACK OR WORKAROUND, OR ANY OF THE TIPS, TRICKS, EXAMPLES OR SUGGESTIONS OUTLINED IN ANY AUTODESK PRODUCT SUPPORT TECHNICAL DOCUMENTS. TECHNICAL DOCUMENTS, SERVICE PACKS AND WORKAROUNDS ARE SUBJECT TO CHANGE WITHOUT NOTICE TO YOU. AUTODESK PROVIDES TECHNICAL DOCUMENTS, SERVICE PACKS AND WORKAROUNDS "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL AUTODESK OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF DATA, OR LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, THAT MAY OCCUR AS A RESULT OF IMPLEMENTING ANY SERVICE PACK OR WORKAROUND, OR ANY SUGGESTION OUTLINED IN ANY AUTODESK PRODUCT SUPPORT TECHNICAL DOCUMENT, EVEN IF AUTODESK OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.