AutoCAD Plugin Development by Example

AutoCAD Plugin Development by Example

Anonymous
Not applicable
4,988 Views
1 Reply
Message 1 of 2

AutoCAD Plugin Development by Example

Anonymous
Not applicable

I am interested in developing an AutoCAD plugin and am trying to understand the relationships between several different types of AutoCAD plugin files:

 

  • Managed DLLs that ship with AutoCAD plugins
  • ARX files that ship with AutoCAD plugins
  • CUIX files that ship with AutoCAD plugins

From what I can tell these three files are all inter-related and work together to initialize and load a plugin, I'm just not seeing the forest through the trees as to what information each file type contains, which files loads or depends on the others, etc.

 

It sounds like a plugin's core functionality is supposed to go inside the ARX file, and written in C++ and compiled for the native/target platform.

 

It also sounds like, at startup, AutoCAD loads its plugin DLLs, which are all managed .NET libraries (typically written in C#), and in turn they invoke their native/compiled respective ARX files. As to where the CUIX file comes into play, I still have no idea.

 

Can anyone help explain the relatioships & dependencies of these files, and what types of code/logic/data goes inside of them? Thanks in advance!

0 Likes
4,989 Views
1 Reply
Reply (1)
Message 2 of 2

tbrammer
Advisor
Advisor

CUIX files contain UI definitions like menus, and toolbars. A CUIX has the same binary format as a ZIP file. You can unzip it's contents with WinZIP or 7Zip etc. It contains a bunch of .cui files which are XML-formatted UI definition files. AutoCAD loads and parses them to build it's UI.

 

ARX, DBX and CRX files are unmanaged C++ modules. Technically they are identical to unmanaged (!) DLL files. While ARX files implement AutoCAD commands, DBX files are so-called "ObjectEnablers" that implement special entity classes. They can also implement various "reactors" that respond to various events. They may depend on ther unmanaged DLLs. There are different loading mechanisms: On AutoCAD startup / On Command start / On custom entity detection / By ARXLOAD. These can be defined via registry.

 

Managed DLL modules can be developed in any .NET language like C# or VB.NET. They can implement the same functions as ARX files. Both options - managed or unmanaged - offer more or less the same functionality.

 

AutoCAD itself is written in C++. The .NET API consists of "Wrappers" to the C++ API. You can download the ObjectARX SDK (which also contains .NET development SDK) and documentation from the Autodesk Developer Network. For details I would recommend the Autodesk forums ObjectARX for C++ and .NET for .NET development.


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.