Skip to content

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.

The three families

FamilyPagesWhat you get
SheetsReportsA layout page you then print with DocumentApi.ReportPdf
Tables and chartsGems map, Gems list CSV, Gems table, Metals table, Breakdown tablesGeometry and text drawn into the model — or, for the CSV, a file on disk
DimensionsAuto-dimensions, Ring, Box, BangleDimension 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:

PageReturnsGroup left behind
Reportsbool, or the new layout page nameA layout page, e.g. "Report 1"
Gems mapnothingGEMS_MAP
Gems list CSVthe written path— writes a file, draws nothing
Gems tablenothingGEMS_LIST, or GEMS_LIST_BY_SELECTION_GROUPS
Metals tablenothingan unnamed group — nothing to search for
Breakdown tablesnothingBREAKDOWN_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.