Any task you can perform within AutoCAD Mechanical can be automated with macros, scripts, or custom external programs. This guide shows you how to use Visual Basic for Applications (VBA) macros to control the program, saving time in repetitive or specialized tasks, helping to enforce company standards, and easing collaboration with other AutoCAD Mechanical users.
AutoCAD Mechanical ActiveX and VBA Reference Guide
This Reference Guide briefly introduces the basics for COM objects, and their associated methods and properties in AutoCAD Mechanical ActiveX Automation, which provides a mechanism to manipulate AutoCAD Mechanical programmatically from within or outside of AutoCAD Mechanical. It does this by exposing various objects to the "outside world." Once these objects are exposed, they can be accessed by many different programming languages and environments, or from within other applications such as Microsoft Word VBA™ or Excel VBA™.
When developing on AutoCAD Mechanical, you can also use the Object ARX SDK.
Software Development Kit (SDK)
The SDK contains libraries, header files, documentation, and samples for AutoCAD Mechanical APIs, which provide object-oriented C++ programming interfaces for developers to use, customize, and extend AutoCAD Mechanical software. Please refer to the readme for changes to this release of SDK.
AutoCAD Mechanical ActiveX Automation contains three parts of type libraries, including SymBBAuto (Symbols, Balloons, and Bills Of Materials), AcadmAuto (AutoCAD Mechanical), and GeAuto (Geometry). These type libraries provide ActiveX® interfaces in AutoCAD Mechanical software to automate AutoCAD Mechanical from other applications via COM automation.
Note: Microsoft is no longer offering VBA distribution licenses to new customers as of July 1, 2007 and has indicated 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 2011 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). Download the Microsoft Visual Basic for Applications Module (VBA) here.
Trial versions are available for most Autodesk products. Download your free 30-days trial version today. You can obtain Autodesk desktop software for development use on an on-going basis by joining ADN at the Standard or Professional membership level too.
All the information and resources needed to use Autodesk cloud-based software and components in your own web and mobile applications can be found on the Autodesk Forge Developer Portal. Get easy access to Forge APIs and documentation, tutorials, GitHub samples, support and more.