Skip to content

Scripting API

IMicroSetting

Returned by MicroSettingApi — the micro-setting: small-stone pavé infrastructure (cutters + V-cutters + channel + row prongs). It doesn’t wrap a single gem — it’s structural for a run of small stones, so it extends IParametricObject directly.

MemberMeaning
CuttersEnabled, VCuttersEnabled, ChannelEnabled, RowProngsEnabledWhich elements the setting builds
SetCuttersEnabled(bool), SetVCuttersEnabled(bool), SetChannelEnabled(bool), SetRowProngsEnabled(bool)Turn an element on or off
Cutters, VCuttersThe seat cutters and the V-cutters: IMicroSettingCutters
ChannelThe channel under the stones: IMicroSettingChannel
RowProngsThe prongs shared between stones: IMicroSettingRowProngs
SetParameters(settings)Changes any number of parameters with one rebuild

Every member of a section has its setter: Cutters.StartWidth and Cutters.SetStartWidth(0.8), Channel.WidthByPercentage and Channel.SetWidthByPercentage(True), RowProngs.EndProngs and RowProngs.SetEndProngs("One"). The full list, with units, is in the generated reference: .NET, Python.

What an edit does

A setter rebuilds the micro-setting on the same stones, as opening it in the panel and accepting does:

  • The handle and its Id stay valid.
  • The cutters, the channel and the prongs are new objects, with new ids. Read them again after an edit.
  • A value that cannot be built throws and leaves the micro-setting as it was.

Each setter is one rebuild. To change several values at once, use SetParameters with the same settings object Create takes:

import json
from ArtisanPlugin.Scripting import MicroSettingApi as micro

setting = micro.All()[0]
setting.SetParameters(json.dumps({
    "cutters": {"start_width": 0.8, "end_width": 0.8},
    "channel": {"enabled": True, "width_by_percentage": True, "width_percentage": 80},
}))

See Micro setting for the sections and their keys.