Skip to content

Scripting API

Pricing

from ArtisanPlugin.Scripting import PricingApi as pricing

The Breakdown engine, headless: what a design costs — metals, gems, processes and extras — computed from the same cost settings the panel uses. Each part has its own page.

The shape of the engine

Calculate gives you the totals; Line detail the same computation with every line item exposed. Both price the active document against the current cost settings — metal prices, labour, margins — so the same design prices differently under different settings, exactly as in the panel.

Certified diamonds are the one external input: with quoteCertified on (the default) the engine quotes tagged certified stones through the Nivoda integration instead of the local gem table.

Conventions

Prices come back in the manufacturer’s configured currency. The calculations touch no geometry and need no Transaction — though they do refresh the cached breakdown the panel displays. Changing a cost setting is the real mutation, and a global one: it persists to the manufacturer’s settings file, affecting every document priced with it, outside the undo stack.