Skip to content

Scripting API

Classic

from ArtisanPlugin.Scripting import ClassicApi as classic

The comfort-fit band - the scriptable ring body for most designs.

Create

ring = classic.Create(width = 3, height = 2, fingerDiameter = 0,
                      withGems = False, gemSize = 1.2, gemsAngle = 180,
                      profile = None, plane = Plane.WorldXY)          # -> IClassic
ParameterDefaultMeaning
width3Band width
height2Band height
fingerDiameter00 = the document’s configured ring size
withGemsFalseAdds a row of stones around the top of the band
gemSize1.2Stone size of the row, mm
gemsAngle180Degrees of the shank covered by the row
profileNoneRING_PROFILE asset by name
planePlane.WorldXYPlacement plane

The gems and their prongs are baked as child objects of the shank.

Edit

Create, Find and All return an IClassic handle. Its six sections cover the whole tool; each setter regenerates the shank in place, keeping its Guid and undo intact:

SectionWhat it edits
TopProfile / MidProfile / BottomProfileThe three band sections: profile asset, closing type, width/height, thickness, comfort, rotation, displacement, orientation
ExternalProfileThe profile carved on the outside face
AdvancedThe opening at the bottom: none, cut or strangle
GemsThe gems row: shape, size, arc, spacing, channel, prongs, drills

SetWidth / SetHeight are shortcuts for the top profile.

from ArtisanPlugin.Scripting import ClassicApi as classic, Transaction

ring = classic.Selected()[0]
with Transaction.Begin("Slimmer band with a gem row"):
    ring.TopProfile.SetWidth(2.2)
    ring.Gems.SetEnabled(True)
    ring.Gems.SetAngle(200)

Queries

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