Skip to content

Scripting API

Eternity

from ArtisanPlugin.Scripting import EternityApi as eternity

A full eternity ring - band plus stones all around, standalone (no mother gem or curve needed).

Create

et = eternity.Create(gemSize = 2, gemShape = "ROUND",
                     shankWidth = 2.25, shankHeight = 1.5,
                     fingerDiameter = 0, profile = None)              # -> IEternity
ParameterDefaultMeaning
gemSize2Stone size, mm
gemShape"ROUND"Stone shape
shankWidth x shankHeight2.25 x 1.5Band section
fingerDiameter00 = the document’s configured ring size
profileNoneRING_PROFILE asset by name

Edit

The IEternity handle has four sections; each setter regenerates the ring in place, re-baking its stones:

SectionWhat it edits
GemsShape, material, carat, explicit sizes, distribution (full, half, three-quarters, 5/7/9 stones), orientation, spacing
ProngsDistribution (shared or individual), straight or curved mode, distances, diameters, height over girdle
BezelsRail mode and shape, profile shape, and the two rails with their own section and thread
ShankThe caps plus the upper and lower band halves, each with profile asset, closing type and section
from ArtisanPlugin.Scripting import EternityApi as eternity, Transaction

ring = eternity.All()[0]
with Transaction.Begin("Half eternity in emerald cut"):
    ring.Gems.SetShape("EMERALD")
    ring.Gems.SetDistribution("HALF")
    ring.Prongs.SetMode("CURVED")

Queries

All(), Find(id), Count(), Selected(), ByLayer(name).