Components of the AutoCAD .NET API
 
 
 

The AutoCAD .NET API is made up of different DLL files that contain a wide range of classes, structures, methods, and events that provide access to objects in a drawing file or the AutoCAD application. Each DLL file defines different namespaces which are used to organize the components of the libraries based on functionality.

The three main DLL files of the AutoCAD .NET API that you will frequently use are:

Use an AutoCAD .NET API DLL

Before classes, structures, methods, and events found in one of the AutoCAD .NET API related DLLs can be used, you must reference the DLL to a project. After a DLL is referenced to a project, you can utilize the namespaces and the components in the DLL file in your project.

Once a AutoCAD .NET API DLL is referenced, you must set the Copy Local property of the referenced DLL to False. The Copy Local property determines if Microsoft Visual Studio creates a copy of the referenced DLL file and places it in the same directory as the assembly file of the project when it is built. Since the referenced files already ship with AutoCAD, creating copies of referenced DLL files can cause unexpected results when you load your assembly file in AutoCAD.

Location of AutoCAD .NET API DLL files

The AutoCAD .NET API DLL files can be located at <drive>:\Program Files\AutoCAD 2010 or as part of the AutoCAD 2010 ObjectARX SDK which can be downloaded from http://www.objectarx.com or the Autodesk Developer Network Web site (http://www.autodesk.com/adn).

After the ObjectARX SDK is installed, the DLL files can be found in the inc-win32 and inc-x64 folders under the main install folder.

NoteThe DLLs in the ObjectARX SDK are simplified versions of the same files that ship with AutoCAD, as they do not contain dependencies on the AutoCAD user interface. It is recommended that you download and install the ObjectARX SDK, and then reference the DLL files that come with the SDK instead of those that are found in the install directory of AutoCAD 2010.

Procedures

To download and install the AutoCAD 2010 ObjectARX SDK
To install the ObjectARX Wizard and the Managed project templates
To reference an AutoCAD .NET API DLL