Use the Microsoft .NET Framework
 
 
 

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

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 ObjectDBXTM 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