acad-jigs
Installation
SKILL.md
AutoCAD Jigs
Use this skill when implementing interactive entity placement with live preview, drag-based input acquisition, or custom drawing feedback during user input in AutoCAD plugins.
Overview
Jigs provide real-time visual feedback while the user moves the cursor. AutoCAD offers two jig base classes:
- EntityJig -- drives a single
Entitythat AutoCAD draws automatically each frame. - DrawJig -- gives full control over what is drawn via
WorldDraw/ViewportDraw, useful when previewing multiple entities or non-entity graphics.
Both follow the same loop: AutoCAD repeatedly calls Sampler() to read input, then Update() (EntityJig) or WorldDraw() (DrawJig) to refresh the preview, until the user accepts or cancels.
EntityJig
Subclass Autodesk.AutoCAD.EditorInput.EntityJig and pass the entity to the base constructor. Override two methods: