What problem does it solve?
AutoCAD plugin development is error-prone and fragile when dealing with assembly resolution, transaction safety, document locking, block/attribute manipulation, and deployment packaging. This Skill captures proven patterns to avoid common runtime conflicts, data corruption, and build/deploy failures.
Core Features & Use Cases
- Project setup & references: Guidance for targeting .NET Framework 4.8, referencing AutoCAD assemblies (AcCoreMgd, AcDbMgd, AcMgd) with Private=false, and multi-DLL resolver patterns.
- Safe drawing operations: Transaction-first patterns, document locking, explicit commit/abort semantics, and robust error handling for creating geometry, layers, text styles, and block definitions.
- Block & attribute automation: Create block definitions, insert block references with populated attributes, and update attribute values programmatically; deploy as an ApplicationPlugins bundle with PackageContents.xml.
- UI & deployment: WPF palette integration, theme detection, pre-build validation, and PowerShell build-and-deploy automation for production workflows.
Use case: Automate inserting production millwork blocks with attributes across multiple drawings while ensuring transactions and document locks prevent corruption.
Quick Start
Create a net48 AutoCAD plugin project that registers a MY_COMMAND to insert a parameterized block with attribute values, follows transaction and document lock patterns, and produces a .bundle-ready output for deployment.