pyACAD authoring guide

Build tools for AutoCAD

Everything you need to turn a folder and a Python file into a button on the AutoCAD ribbon and a command you can type. No compiler, no Visual Studio, no restart.

New here

Start with the quickstart. It gets a working tool on the ribbon in about five minutes, and every other page assumes you have done it.

pyACAD loads extensions from disk at startup. An extension is a folder tree whose folder names describe the ribbon: a .tab becomes a ribbon tab, a .panel becomes a panel on it, and a .pushbutton becomes a button that runs the script.py inside it. There is no manifest to register, no project to compile, and no build step. Create the folders, drop in a script, press Reload.

Every button is also a real AutoCAD command. Click it, type its name at the command line, put it in a macro or a script file, or call it from AutoLISP with arguments and get a value back: the tool runs the same way each time, inside the drawing, with one undo step. See AutoCAD commands and AutoLISP.

These pages document the authoring surface exhaustively: every folder suffix the runtime recognises, every key it reads out of bundle.yaml, every global it injects into your script, and every function in the pyacad library. Where the runtime has a sharp edge, it is called out rather than glossed over.

Start

Bundles

Scripts

Reference

Practice