The objects, properties, and methods exposed by Automation objects are contained in a type library. A type library is a file or part of a file that describes the type of one or more objects.
Type libraries do not store objects; they store information. By accessing a type library, applications and browsers can determine the characteristics of an object, such as the interfaces supported by the object and the names and addresses of the members of each interface.
Before you can use the Automation object exposed by an application, you must reference its type library. The Automation objects related to AutoCAD are
- AutoCAD 2015 Type Library file, acax20enu.tlb, which is located at %ProgramFiles%\Common Files\Autodesk Shared
Note: Reference is automatically set in the VBA IDE, but needs to be set in other interactive development environments.
- AutoCAD/ObjectDBX Common 20.0 type library file, axdb20enu.tlb, which is located at %ProgramFiles%\Common Files\Autodesk Shared
- AcSmComponents20 1.0 type library file (Sheet Set Object library), AcSmComponents20.tlb, which is located at %ProgramFiles%\Common Files\Autodesk Shared
- CAO 1.0 type library file (Connectivity Automation Object library), cao20enu.tlb, which is located at %ProgramFiles%\Common Files\Autodesk Shared
- Transmittal 18.0 type library file (eTransmittal Object library), AcETransmit18.tlb, which is located at %ProgramFiles%\Common Files\Autodesk Shared
- Autodesk Standards Manager Type Library file (CAD Standards Plug-in library), AcStMgr.tlb, which is located at %ProgramFiles%\Common Files\Autodesk Shared
Note: Use with VB6, Managed .NET, or C++ to create stand-alone DLLs that can be used with the CAD Standards feature in AutoCAD or the Batch Standards Checker.
You can use an application's objects without referencing the application's type library. However, it is preferable to add the type library reference for the following reasons:
- Globally accessible functions may be accessed directly without qualification.
- Invocation of functions, properties, and methods can be checked at compile time for correctness, and therefore will execute more quickly at runtime.
- It is possible to declare variables of the types defined in the library, which increases runtime reliability and readability.