Atomic Knowledge · ZWCAD

ZRXSDK & API Development

ZWCAD's developer APIs: ZRX (C++ compatible with ARX), .NET API, and LISP for custom application development.

Definition & Context

ZWCAD provides three development APIs for customization and automation: ZRX (C++) compatible with AutoCAD's ObjectARX API, .NET API (C#/VB.NET) via ZwSoft.ZwCAD.* namespaces, and LISP (AutoLISP/Visual LISP compatible). The ZRX SDK enables deep kernel-level extensions: custom entities, reactor callbacks, context menus, and ribbon panel integration.

The .NET API exposes the document model through familiar Autodesk-compatible patterns: Database, Transaction, BlockTableRecord, Editor for user interaction. Most AutoCAD .NET plugins require only namespace changes and recompilation to run on ZWCAD. LISP provides the fastest scripting path for command automation, batch processing, and simple dialog boxes (DCL).

Deployment: ZRX modules load via APPLOAD or the startup suite. .NET DLLs use NETLOAD. CUI/CUIX customization files define ribbon tabs, tool palettes, and command aliases for plugin UI.

Why It Matters

ZWCAD's APIs matter because they deliberately mirror AutoCAD's customization stack: ZRX is ObjectARX-compatible, the .NET API mirrors the familiar document model, and LISP runs AutoLISP/Visual LISP code.

That compatibility means many existing AutoCAD add-ins and routines can be reused or ported with limited changes, which is often the deciding factor for teams evaluating a migration.

Best Practices

  • Start with LISP for simple automation tasks (batch attribute editing, drawing cleanup) — no compilation needed
  • Use .NET for complex tools requiring UI, database operations, or external system integration (ERP, PDM)
  • Reserve ZRX (C++) for custom entity definitions or performance-critical operations on millions of entities
  • Test plugins against both ZWCAD and AutoCAD simultaneously if cross-platform compatibility is required
  • Use the Event/Reactor system (DocumentCreated, CommandEnded) for automatic workflows without user intervention

Common Pitfalls

  • ARX/ZRX binary incompatibility between ZWCAD versions — recompile plugins for each major ZWCAD release
  • Not all AutoCAD API methods have ZWCAD equivalents — check the ZRX SDK compatibility matrix before porting
  • LISP performance degrades on large entity sets (10k+) — switch to .NET for batch operations on large drawings
  • DCL dialog definitions have limited widget types — use .NET WPF/WinForms for modern UI requirements

References & Further Reading

Related Concepts

Explore more ZWCAD topics in our ZWCAD knowledge base, or browse the full terminology index.

For structured learning, see our ZWCAD learning path.

Enterprise Production Implementation & GstarCAD 2027 Workflow

  • Database Serialization & Binary Fidelity: Ensure all entities and symbol table records associated with ZRXSDK & API Development are authored on standardized ISO 13567 layers rather than Layer 0 or Defpoints, and verify lossless round-trip persistence in native DWG (AC1032) format.
Implementation Stage GstarCAD / AutoCAD Execution Quality Assurance (QA/QC) Gate
1. Environment Setup Load corporate .dwt template; verify INSUNITS and LUNITS. Confirm 1:1 metric (mm) or imperial unit consistency across all linked Xrefs.
2. Geometry & Metadata Authoring Apply associative constraints, block attributes, or GD&T tolerance frames. Verify zero disassociated annotations via ANNOMONITOR = 2.
3. Deliverable Exchange Publish via Sheet Set Manager (SSM) or export to DWG / IFC / STEP. Inspect output in DWG FastView or FastView 3D before client release.