mcpField
A
acad-arx-wizard

acad-arx-wizard

github.com/autodesk-platform-servicesDevelopment3153 installsUpdated 4w ago
Repository

About acad-arx-wizard

acad-arx-wizard is a skill that scaffolds ObjectARX C++ projects and classes through PowerShell scripts. It is aimed at AutoCAD 2027 developers using Visual Studio 2026, including those replacing the broken classic wizard.

Key features

  1. 01Generate ARX, DBX, or CRX projects
  2. 02Scaffold common ObjectARX classes
  3. 03Collect required script parameters
  4. 04Provide build configuration references
  5. 05Troubleshoot scaffolding and build issues

Use cases

  1. 01Create a new ObjectARX project
  2. 02Add a Jig or Reactor class
  3. 03Generate MFC, .NET, or COM wrappers
  4. 04Diagnose SDK or linker configuration problems

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/autodesk-platform-services/skills --skill acad-arx-wizard

After installing, type/acad-arx-wizardin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

README.md
docs/
arx-dev-guide.md
learnings.md
props/
Autodesk.arx-2027-net.props
Autodesk.arx-2027.props
crx.props
scripts/
Invoke-TemplateExpansion.ps1
New-ArxApp.ps1
New-ArxComWrapper.ps1
New-ArxCustomObject.ps1
New-ArxDynProp.ps1
New-ArxJig.ps1
New-ArxMFCSupport.ps1
New-ArxNETWrapper.ps1
New-ArxReactors.ps1
templates/arx-app/
acrxEntryPoint.cpp
AssemblyInfo.cpp
Autodesk.arx-2027-net.props
Autodesk.arx-2027.props
crx.props
DocData.cpp
DocData.h
ReadMe.txt
Resource.h
root.cpp
root.idl
root.rc
root.rgs
StdAfx.cpp
StdAfx.h

Details

From the project README

ObjectARX Wizard Skill — AutoCAD 2027 / VS 2026

Scaffold ObjectARX C++ projects and classes using an AI conversation + PowerShell generator.

Skill Location

The scripts live in the same folder as this SKILL.md:

<skill-root>/
├── SKILL.md
├── docs/
│   ├── arx-dev-guide.md              ← ObjectARX 2027 build configuration reference
│   └── learnings.md                  ← live wiki: gotchas, workarounds, verified API behaviors
├── scripts/
│   ├── Invoke-TemplateExpansion.ps1   ← shared token engine (do not call directly)
│   ├── New-ArxApp.ps1                 ← full ARX/DBX/CRX project
│   ├── New-ArxCustomObject.ps1        ← custom ObjectDBX entity class
│   ├── New-ArxReactors.ps1            ← transient reactor class
│   ├── New-ArxJig.ps1                 ← AcEdJig subclass
│   ├── New-ArxMFCSupport.ps1          ← MFC dialog / palette / control
│   ├── New-ArxNETWrapper.ps1          ← managed .NET wrapper
│   ├── New-ArxComWrapper.ps1          ← ATL COM wrapper object
│   └── New-ArxDynProp.ps1             ← ATL dynamic property class
├── templates/                         ← source template files (do not edit)
└── props/                             ← Autodesk.arx-2027.props, crx.props

When to Use

  • Developer wants to start a new AutoCAD 2027 ARX/DBX/CRX C++ project in VS 2026
  • Developer wants to add a Jig, Reactor, Custom Object, or other class to an existing project
  • The classic VS wizard (File → New → Project → ObjectARX) is broken (VS 2026 regression — see MS Developer Community #11071541)

Wizard Types

User says...Script to run
"ARX app", "new plugin", "create project"New-ArxApp.ps1
"custom object", "custom entity", "AcDbEntity subclass"New-ArxCustomObject.ps1
"reactor", "database reactor", "entity reactor"New-ArxReactors.ps1
"jig", "AcEdJig", "interactive input"New-ArxJig.ps1
"MFC dialog", "palette", "dockbar", "MFC class"New-ArxMFCSupport.ps1
".NET wrapper", "managed wrapper", "C++/CLI"New-ArxNETWrapper.ps1
"COM wrapper", "ATL object", "IDispatch"New-ArxComWrapper.ps1
"dynamic property", "AcDbDynBlockReference", "dynprop"New-ArxDynProp.ps1

Procedure

Step 1 — Identify skill root

Resolve the absolute path to this SKILL.md's containing directory. All scripts are at: <skill-root>\scripts\


Step 2 — Identify wizard type

Map user intent to one of the 8 wizard types above. If unclear, ask:

"Which wizard do you need? New ARX/DBX/CRX project, or an add-on class (Jig, Reactor, Custom Object, MFC, .NET Wrapper, COM Wrapper, Dynamic Property)?"


Step 3 — Collect parameters

Ask only for mandatory parameters that are missing. Do not ask for optional ones unless the user mentions them.

New-ArxApp — full project
ParameterMandatoryValuesAsk if missing
-ProjectNameYesvalid C++ identifier"What is the project name?"
-OutputPathYesfolder path"Where should the project be created?"
-AppTypeNoarx / dbx / crxDefault: arx (ask if user is unsure)
-MfcModeNonone / shared / extDefault: none
-UseAtlNoswitchOnly ask if user mentions COM
-UseDotNetNoswitchOnly ask if user mentions .NET or CLR
-RdsPrefixNo3-letter symbolDefault: Adk
New-ArxCustomObject — custom entity
ParameterMandatoryDefault
-ClassNameYes—
-OutputPathYes—
-BaseClassNoAcDbEntity
-ProtocolsNo2 (Object + Entity)
-ProjectNameNoMyProject
New-ArxReactors — reactor
ParameterMandatoryNotes
-ClassNameYes—
-ReactorTypeYesSee reactor type list below
-OutputPathYes—
-ProjectNameNoMyProject

Common reactor types: AcDbDatabaseReactor, AcDbObjectReactor, AcDbEntityReactor, AcEdInputContextReactor, AcApDocManagerReactor, AcDbLayoutManagerReactor, AcDbAnnotationScaleReactor, AcDMMReactor

New-ArxJig — jig class
ParameterMandatoryDefault
-ClassNameYes—
-OutputPathYes—
-ObjectNameNoAcDbEntity
-NumberOfInputsNo1
-ProjectNameNoMyProject
New-ArxMFCSupport — MFC class
ParameterMandatoryDefault
-ClassNameYes—
-OutputPathYes—
-MfcTypeNoDialog
-IddDialogNoIDD_DIALOG1
-ProjectNameNoMyProject

MFC types: Dialog, ChildDialog, TabDialog, Palette, PaletteSet, DockControlBar, Control, FileDialog, FileNavDialog, FieldDialog, FieldFormatDialog, FieldOptionDialog

New-ArxNETWrapper — managed wrapper
ParameterMandatoryDefault
-WrapperNameYes—
-OutputPathYes—
-CustomObjectNameNoAcDbEntity
-CompanyNamespaceNoAutodesk
-ObjectNamespaceNoAutoCAD
-ManagedDerivationNoEntity
-ProjectNameNoMyProject
New-ArxComWrapper — ATL COM wrapper
ParameterMandatoryDefault
-ShortNameYes—
-OutputPathYes—
-ConnectionPointsNoswitch
-InterfaceDualNoswitch
-ProjectNameNoMyProject
New-ArxDynProp — dynamic property
ParameterMandatoryDefault
-ClassNameYes—
-OutputPathYes—
-InterfaceNameNoderived from ClassName
-ConnectionPointsNoswitch
-ProjectNameNoMyProject

Step 4 — Run the script

Run the appropriate script from <skill-root>\scripts\ in a PowerShell terminal.

Example for a full ARX project:

& powershell.exe -ExecutionPolicy Bypass -NoProfile -File "<skill-root>\scripts\New-ArxApp.ps1" `
    -ProjectName MyPlugin `
    -OutputPath  "C:\Dev" `
    -AppType     arx `
    -MfcMode     shared

Example for a Jig add-on:

& powershell.exe -ExecutionPolicy Bypass -NoProfile -File "<skill-root>\scripts\New-ArxJig.ps1" `
    -ClassName      CMyJig `
    -ObjectName     AcDbLine `
    -NumberOfInputs 2 `
    -ProjectName    MyPlugin `
    -OutputPath     "C:\Dev\MyPlugin"

Step 5 — Confirm output

After the script runs, confirm what was generated by listing the output folder:

Get-ChildItem "C:\Dev\MyPlugin" | Select-Object Name, Length

Report the file list to the user and include next steps:

For New-ArxApp:

"Project created at C:\Dev\MyPlugin\MyPlugin.vcxproj. Open it in Visual Studio 2026. Verify the ObjectARX SDK path in Autodesk.arx-2027.props, then Build → x64 Debug."

For add-on wizards:

"Generated ClassName.h and ClassName.cpp in OutputPath. In Visual Studio: right-click your project → Add → Existing Item → select the files."


Troubleshooting

ProblemFix
Destination already existsChoose a different -OutputPath, or delete the existing folder first
ReactorType not foundRun Get-ChildItem <skill-root>\templates\reactors\*_tmpl.h | ForEach-Object { $_.Name -replace '_tmpl\.h$','' } for the full list
Build error: Cannot open include file 'acdb.h'Set ARXSDK env var or edit Autodesk.arx-2027.props to point at your ObjectARX 2027 SDK
CLRSupport errors in .NET wrapperEnsure the project's .vcxproj has <CLRSupport>NetCore</CLRSupport>
VS 2026 wizard still brokenThis skill replaces it — ignore the broken File→New wizard. Use this skill instead.

Post-Scaffolding: Build Configuration Reference

After a project is scaffolded, the developer (or you, the AI agent) will continue writing plug-in code. When helping with build settings, library selection, preprocessor defines, or diagnosing linker/runtime errors, read <skill-root>/docs/arx-dev-guide.md. It covers:

  • Required compiler flags (/MD, /EHsc, /GR, etc.) and why each matters
  • The property-sheet inheritance chain (rxsdk_common → debug/release → dbx/arx/crx)
  • Which .lib files to link for each project type (DBX, ARX, CRX) and optional APIs (B-Rep, AEC Modeler)
  • Debug vs Release configuration differences
  • Common pitfalls — especially the /MD vs /MDd rule (AutoCAD is always a Release binary; plug-ins must use /MD even in Debug)

Critical rule: AutoCAD ships as a Release build. Plug-in DLLs must always link with /MD (MultiThreadedDLL), never /MDd. Using /MDd causes CRT mismatch, heap corruption, and crashes. /MDd is only valid with an internal Autodesk Debug build of AutoCAD.


Field Learnings

<skill-root>/docs/learnings.md is a living wiki of gotchas hit in real sessions: VS 2026 + MFC + ARX SDK 2027 build traps, DllMain conflicts, MFC module-state rules, scaffold quirks. Read it when:

  • Diagnosing build / link errors that look like CRT / STL / RTC mismatches
  • A scaffolded project fails on first build with MFC shared mode
  • Adding new templates — promote any newly verified fix from learnings.md back into the template files in this skill so future scaffolds inherit the fix.

Comments

Markdown supported