Microsoft Visual Basic for Applications Module FAQWhat is the status of VBA support in the most recent releases of the AutoCAD product line?Microsoft made the decision to stop offering VBA distribution licenses to new customers as of July 1, 2007 and they have expressed that there are no plans to provide VBA product enhancements in the future. As a result of this, though Autodesk will continue to “unofficially” support VBA in its most recent releases of the products, software developers are strongly encouraged to base all future Microsoft Windows based development for AutoCAD based products on the Microsoft .NET Framework (VB .NET, C#, managed C++ etc).
As first introduced with AutoCAD 2010, AutoCAD is not distributing VBA as part of the most recent AutoCAD installation disk. Rather, customers will need to download VBA here. What do you mean “unofficial” support for VBA?We will continue offering VBA as a download for customers, however, because Microsoft has discontinued support, we will only make a best efforts attempt to fix any defects and do not plan enhancements to VBA support in future product releases. What do you recommend for non-programmers to create simple scripts? .NET looks significantly harder to use than VBA. Though a little bit longer learning curve, we strongly recommend non-programmer’s get started customizing AutoCAD based on VB .NET using the free Microsoft VB Express. Developing .NET based applications with VB Express is a great no cost way to get started customizing AutoCAD that is easily extended if and when one wants to develop more powerful add-ons for AutoCAD. How will you assist the migration from VBA to .NET?To ease the changeover we will continue to offer VBA as a download for applications based on AutoCAD 2012 and later. Autodesk is providing documentation, on-line training materials and support to help our customers and developers migrate their VBA applications to the .NET Framework. In addition, Autodesk has recruited a number of members of the Autodesk Developer Network to deliver customers fee based porting of their VBA applications to .NET. Which Autodesk products are affected by this change?This change affects all versions of AutoCAD, AutoCAD® Architecture, AutoCAD® MEP, AutoCAD® Electrical, AutoCAD® Map 3D, and AutoCAD® Mechanical, and AutoCAD® Structural Detailing software since the 2010 release. It affects all versions of AutoCAD® Civil 3D® software since the 2011 release. It does not affect Autodesk® Inventor®, which continues to have VBA delivered in the box. What languages are supported with this VBA install?A global, English installer can be installed on all language versions of AutoCAD-based products. The VBA module will install the correct language resources on the target platform. Will this one VBA module install on the most recent versions of AutoCAD based products that used to ship with VBA support, such as AutoCAD Architecture, AutoCAD Mechanical, and AutoCAD Map 3D?Yes, the VBA module will install on the most recent AutoCAD products. How can enterprise users deploy VBA?Now that we are making VBA an additional component that needs to be downloaded and installed separately, we will be supplying users and CAD managers with a script to deploy VBA. This script can be downloaded from the product support page. Where can I learn more about developing with .NET?A list of AutoCAD VBA to .NET Migration Resources is available as here: What is Visual Basic Express?Visual Basic Express is a free streamlined version of Microsoft’s Visual Studio specifically designed for VB .NET application development. Visual Basic Express enables you to use the same underlying Autodesk COM APIs as VBA did, as well as the more powerful .NET API. Use of Visual Basic Express will require modifications to your existing VBA code because there are significant language and code structure differences between VBA and Visual Basic Express’ VB .NET. Can I use other .NET languages such as C#?Yes. You can use any .NET language to use the AutoCAD .NET API, or to access the AutoCAD ActiveX API. However, if you are migrating your VBA code then you are likely to find VB.NET the easiest language to move to. How can I get support on migrating to .NET?In addition to the resources listed above (Where can I learn more about developing with .NET?): ADN partners can request migration assistance through our ADN extranet portal and subscription customers can ask migration questions via subscription support. In addition, you are welcome to post and answer questions on the VB Autodesk Discussion forum. Does this change affect any other AutoCAD APIs?No. This just affects VBA. Can I use the VBA Automation in Microsoft Office applications such as Excel to access AutoCAD objects?Yes. The AutoCAD ActiveX API required for this will work without the VBA module installed. Accessing AutoCAD objects through COM and .NET APIs will continue to work.
|