Scripting API
Drafting
from ArtisanPlugin.Scripting import DraftingApi as drafting
Everything that turns a finished design into paperwork — the sheets, tables and annotations a workshop actually receives. Each has its own page.
ReportsThe auto A4 report, or your own template with tags.
Gems mapThe 2D stone chart: one colored circle per gem.
Gems list CSVThe gems list, written as CSV.
Gems tableThe gems list drawn into the document, optionally by group.
Metals tableEstimated cast weights per metal, drawn as a table.
Breakdown tablesThe four production-sheet cost tables.
Auto-dimensionsDispatches by design type: ring set, or bounding box.
Ring dimensionsSix dimensions in four groups, finger diameter included.
Box dimensionsWidth, depth and height around the bounding box.
Bangle dimensionsWidth and thickness per section, plus the inner opening.
The three families
| Family | Pages | What you get |
|---|---|---|
| Sheets | Reports | A layout page you then print with DocumentApi.ReportPdf |
| Tables and charts | Gems map, Gems list CSV, Gems table, Metals table, Breakdown tables | Geometry and text drawn into the model — or, for the CSV, a file on disk |
| Dimensions | Auto-dimensions, Ring, Box, Bangle | Dimension annotations placed on the design |
Finding the result afterwards
Most of these return void, so the only way back to what they drew is the Rhino group they leave behind. The names are worth keeping to hand:
| Page | Returns | Group left behind |
|---|---|---|
| Reports | bool, or the new layout page name | A layout page, e.g. "Report 1" |
| Gems map | nothing | GEMS_MAP |
| Gems list CSV | the written path | — writes a file, draws nothing |
| Gems table | nothing | GEMS_LIST, or GEMS_LIST_BY_SELECTION_GROUPS |
| Metals table | nothing | an unnamed group — nothing to search for |
| Breakdown tables | nothing | BREAKDOWN_METALS — for every category, not one name per table |
Each call adds another copy; nothing is replaced or deduplicated.
Conventions
Millimetres, and mutations belong inside a Transaction for one-step undo.