Scripting and automation
CompleteChecked against Musa CAD 0.8.0Verified
Musa CAD is built so that programs can do everything a drafter does at the keyboard: create a drawing, check it, and print it. You can generate a part drawing from a spreadsheet, plot a whole drawing set every night, check every drawing in a repository before it goes out, or let an AI agent draft a complete set of fabrication drawings from a 3D model.
How it works
Section titled “How it works”Automation in Musa CAD rests on four simple pieces.
- Drawings are plain text. A
.musafile is a list of readable records, one object per line:LINE 0 0 120 0 ...,CIRCLE 30 40 10 .... Any language can write one. DXF works too. - The
musacadcommand runs without a window.musacad --checkopens a drawing and reports problems.musacad --plotprints it to PDF. Neither needs a screen, so they work on servers, in scheduled jobs and in build pipelines. - Clear answers for programs. Every run ends with an exit code that a script can test, and
--check --jsongives a report a program can read. - The libraries can be linked. Musa CAD is LGPL-licensed C++, so your own tool can link its libraries to load, change and plot drawings directly.
There is no macro language inside the program (no AutoLISP or VBA). Work happens outside it: a program writes the drawing, and Musa CAD checks and prints it. For most automation this is simpler and goes further, because the program can use any language, any data source and any library.
Where to start
Section titled “Where to start”The command linemusacad --check and --plot: every option, the exit codes, batch printing and CI recipes.
Drawings from codeA short Python program that writes a real drawing. Change a number, get a new drawing.
AI workflowsHow an AI agent turns 3D models into finished fabrication drawings with Musa CAD, and how to set up your own.
The .musa formatWhat a drawing file contains, how versions work, and the full version history.