Skip to content

Scripting API

Assets

from ArtisanPlugin.Scripting import AssetsApi as assets

AssetsApi is read-only access to your profile library — the curves the parametric tools build from. Assets are created and edited through the UI; scripts only browse them and reference them by name.

MethodReturns
Types()Valid asset types: RING_PROFILE, EXTERNAL_RING_PROFILE, RING_SIDE_CURVE, BEZEL_PROFILE, CHANNEL_PROFILE, CHARM_PROFILE, PEGHEAD_PROFILE, …
List(type = None)Assets in the library (optionally filtered by type), each with Id, Name, Type, Semantic
GetDefault(type)The default asset for a type — the one every Create uses when no profile is given

Referencing a profile

Wherever a method takes a profile parameter — a creation method like ClassicApi.Create, or a handle setter like TopProfile.SetProfile — you pass the asset’s name. It is matched case-insensitively within its type (and against the asset’s Semantic description, so libraries renamed on migration keep resolving). Omitting it falls back to the type’s default, and an unknown name fails with the list of available ones.

from ArtisanPlugin.Scripting import AssetsApi as assets, ClassicApi as classic, Transaction

for a in assets.List("RING_PROFILE"):
    print(a.Name, "-", a.Semantic)

print("default:", assets.GetDefault("RING_PROFILE").Name)

with Transaction.Begin("Ring on a knife-edge profile"):
    classic.Create(width = 2.4, profile = "Knife Edge")

Which type does a slot take?

Each profile slot accepts one asset type. The ones the API exposes today:

SlotAsset type
Shank profiles — ClassicApi.Create, IClassic.TopProfile/MidProfile/BottomProfile, ICathedral.Shank, IEternity.Shank.Upper/Lower, IBypass/IAdvancedCathedral stations, IMatchingShank, IWeddingRing.Profile, ISignetFaceRING_PROFILE
IClassic.ExternalProfileEXTERNAL_RING_PROFILE
IAdvancedSignetRing.SetLateralProfileRING_SIDE_CURVE
BezelsBEZEL_PROFILE
Channels and halosCHANNEL_PROFILE
PegheadsPEGHEAD_PROFILE
CharmsCHARM_PROFILE