autocad-plugin-development

Automate AutoCAD .NET plugin creation for custom commands and block attributes.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/ecnepsyroc-bot/Dejavara --skill autocad-plugin-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: autocad-plugin-development
Source: https://github.com/ecnepsyroc-bot/Dejavara/tree/main/deploy/skills/autocad-plugin-development
Command: npx skills add https://github.com/ecnepsyroc-bot/Dejavara --skill autocad-plugin-development

SYSTEM DOCUMENTATION & REQUIREMENTS

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.

Frequently Asked Questions about autocad-plugin-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an AutoCAD plugin in C# to insert block references with attributes?

To create an AutoCAD C# plugin for block insertion, target .NET Framework 4.8 and reference AcDbMgd assemblies. Use transaction-first patterns to programmatically create block definitions, insert block references, and populate attribute values safely.

Why does my AutoCAD .NET plugin fail with assembly resolution errors in multi-DLL projects?

AutoCAD .NET multi-DLL plugins fail with assembly resolution errors when resolver patterns are not applied correctly. Implement robust assembly resolution handling to ensure dependencies load properly and prevent runtime conflicts during command execution.

What's the best way to handle document locking and transactions in AutoCAD .NET plugins?

The best way to handle document locking and transactions in AutoCAD .NET plugins is using transaction-first patterns with explicit commit or abort semantics. Enforce document locks during drawing operations to prevent data corruption when updating geometry or block definitions.

How do I deploy an AutoCAD plugin as a bundle with PackageContents.xml?

To deploy an AutoCAD plugin as a bundle, package your compiled .NET DLLs into an ApplicationPlugins bundle directory. Include a PackageContents.xml file and ensure AutoCAD assembly references like AcMgd are set with Private=false for proper deployment.

Can I use WPF palettes for UI integration in an AutoCAD .NET Framework 4.8 plugin?

Yes, you can use WPF palettes for UI integration in an AutoCAD .NET Framework 4.8 plugin. Implement palette integration with theme detection to match the AutoCAD environment, ensuring your custom commands present a native user experience.

Do I need to set Private=false for AcDbMgd and AcMgd references in AutoCAD C# development?

Yes, you need to set Private=false for AcCoreMgd, AcDbMgd, and AcMgd assembly references in AutoCAD C# development. This prevents local copy deployment conflicts and ensures the plugin uses the AutoCAD provided assemblies during runtime execution.