Skip to content

Scripting API

Gemsets

Every setting in the Diamonds ribbon, headless. Each has its own page: what its facade can create, and what its handle can edit afterwards.

Conventions

Everything follows the house rules: millimetres, 0 keeps the tool default (or your saved defaults), profiles resolve by asset name, and mutations belong inside a Transaction.

Unless a page says otherwise, each setting is built around a mother gem and stays its parametric child.

The three families

The settings split into three groups, and the difference decides what you pass in and what you get back.

FamilyPagesBuilt around
Single-gem settingsBezel, Advanced bezel, Peghead, Basket, Advanced basket, Halo, Hidden halo, Cluster, Tulip, Martini, TrellisAn existing mother gem — ForGem(gemId) finds them back
Standalone stone creatorsCabochon, PearlNothing — they create their own stone at a point
Many stones at onceGems on curve, Gems by network, Channel, Pave on surface, Micro settingA curve, a surface or a run of small gems

Cutters sit slightly apart: they are the drilling solids a seat is built from, one per gem, and you subtract them from the metal yourself.

What each one can do

Almost every setting can be built from scratch. What differs is how much of it you can still change afterwards: some handles regenerate the object through setters, others are read-only once created — run the tool in the UI to get a variant the script cannot reach.

SettingFacadeCreateEdit
BezelBezelApiyesfull
Advanced bezelAdvancedBezelApiyesread-only
PegheadPegheadApiyesfull
BasketBasketApiyes, one per gemprongs only
Advanced basketAdvancedBasketApiyes, one per gemprongs and rails
HaloHaloApiyesstone size and spacing
Hidden haloHiddenHaloApiyesstone size and spacing
ClusterClusterApiyesread-only
TulipTulipApiyespipe and height
MartiniMartiniApiyesprong height, side gems
TrellisTrellisGemsetApiyesread-only
CabochonCabochonApiyes, standalone stoneread-only
PearlPearlApiyes, standalone stoneread-only
CuttersCutterApiyes, one per gemread-only
Gems on curveGemsOnCurveApiyesread-only
Gems by networkGemsByNetworkApi-read-only
ChannelChannelApiyes, returns idsno handle
Pave on surfacePaveApiyes, returns gem idsno handle
Micro settingMicroSettingApiyes, returns idsread-only

Gems by network is the one setting with no Create: build the network in Rhino, then read, move and delete it from a script.

The shared surface

Every setting facade shares the same query surface — All(), Find(id), Count(), Selected(), ByLayer(name), plus ForGem(gemId) on single-gem settings and ForCurve(curveId) on curve-driven ones.

Handles share a structural base (Id, MotherGemId, ObjectType, LayerName, Position, Move, Delete); settings that wrap one gem also expose that gem’s GemShape, GemMaterial and GemCaratWeight.

On multi-gem objects (eternities, shanks, micro-settings) MotherGemId is empty by design; for curve-driven settings the parent is CurveId.

from ArtisanPlugin.Scripting import BezelApi as bezel

for b in bezel.All():
    print(b.Id, b.GemShape, b.GemCaratWeight)