Share
 
 

About Using ActiveX Automation with the Microsoft .NET Framework (ActiveX)

AutoCAD automation objects can be accessed from projects created with Microsoft® Visual Studio®.

To fully access AutoCAD automation objects from Microsoft Visual Studio® .NET, create references to the following files:

  • AutoCAD 2025 Type Library, acax25enu.tlb, located at <drive>:\Program Files\Common Files\Autodesk Shared
  • AutoCAD/ObjectDBX Common 25.0 Type Library, axdb25enu.tlb, located at <drive>:\Program Files\Common Files\Autodesk Shared

These references will make available the following primary interop assemblies:

  • Autodesk.AutoCAD.Interop.dll (for AutoCAD-specific types and Autodesk)
  • AutoCAD.Interop.Common.dll (for types shared by ObjectDBX host applications)

The interop assemblies are located in the global assembly cache; they map automation objects to .NET counterparts.

After you reference the type libraries, you can declare AutoCAD-based variables in Microsoft Visual Studio .NET, as in the following examples:

Dim objAcad As Autodesk.AutoCAD.Interop.AcadApplication
Dim objLine As Autodesk.AutoCAD.Interop.Common.AcadLine

You can load a .NET application using the NETLOAD command in AutoCAD.

Additional information about using a .NET application with AutoCAD is available from the Developer Center section of the Autodesk website.

Was this information helpful?