CAD Software Guides

AutoCAD ObjectARX C++ Development for Custom Engineering Applications

ObjectARX is AutoCAD's most powerful API. It is the technology behind many commercial AutoCAD applications, and the right choice when .NET is not enough.

What is ObjectARX?

ObjectARX is a C++ SDK that runs inside the AutoCAD process with direct access to the drawing database and core services. Applications are compiled as .arx (application) and .dbx (object enabler) modules.

What only ObjectARX does well

CapabilityWhy it matters
Custom entitiesNew object types with their own drawing, grips, snaps and data (for example a "smart valve" or "beam")
Object enablersLet other users open and view drawings with your custom objects
Maximum performanceNative code for heavy geometry or very large drawings
Deep integrationLow-level reactors, protocol extensions, custom file handling
Reuse of C++ librariesEngineering calculation engines and geometry kernels

Custom entity example

class EmPipe : public AcDbEntity
{
public:
    ACRX_DECLARE_MEMBERS(EmPipe);
    Acad::ErrorStatus dwgInFields(AcDbDwgFiler* filer) override;
    Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* filer) const override;
    Adesk::Boolean subWorldDraw(AcGiWorldDraw* wd) override;
    Acad::ErrorStatus subGetGripPoints(AcGePoint3dArray& grips,
        AcDbIntArray& osnapModes, AcDbIntArray& geomIds) const override;
private:
    AcGePoint3d m_start, m_end;
    double m_diameter = 100.0;
    AcString m_spec;   // pipe specification
};

Custom entities vs overrules

Custom entities need an object enabler to display correctly for others. Overrules (available in both ObjectARX and .NET) change how standard entities look or behave without creating new types, which avoids proxy objects. Choosing the right approach is an important design decision.

Version compatibility

  • ObjectARX modules must be built with the Visual Studio version specified for each AutoCAD release family.
  • Binary compatibility usually spans a few releases, then a rebuild is required.
  • Custom object data formats must be versioned to stay readable.

When to choose ObjectARX

  • You need true custom objects.
  • Performance matters on very large data sets.
  • You are building a commercial product on AutoCAD.
  • You have existing C++ engineering code to reuse.

For most business add-ins, .NET is faster to develop. Many products combine both: ObjectARX for the core objects and .NET for the user interface.

Use ObjectARX where its power is needed, and .NET everywhere else.

ObjectARX development with ENGIMANDI

See AutoCAD API development and our comparison of AutoLISP vs .NET vs ObjectARX.

EM
ENGIMANDI CAD Team

We build CAD add-ins, automation and integrations for engineering and manufacturing companies worldwide.