Skip to content

.NET API

ClassicApi

Classic ring shanks: comfort-fit bands at the document finger size, optionally with a stone row.

from ArtisanPlugin.Scripting import ClassicApi

See also the guide, Shanks › Classic, and the Python package, ra.classic.

Methods

Method
AllIClassic handles for every object of this kind in the active document (empty when there is no document).
ByLayerIClassic handles on the layer with the given full path (empty when the layer does not exist).
CountNumber of objects of this kind in the active document.
CreateBuilds a classic ring shank (the ArtisanClassic tool, headless): a comfort-fit band at the document’s finger size, optionally with a row of gems around the top.
FindThe handle for id, or null when the id does not belong to an object of this kind.
SelectedClassics currently selected in the active doc.

All

IReadOnlyList<IClassic> ClassicApi.All()

IClassic handles for every object of this kind in the active document (empty when there is no document).

Returns IReadOnlyList<IClassic>.

ByLayer

IReadOnlyList<IClassic> ClassicApi.ByLayer(string layerName)

IClassic handles on the layer with the given full path (empty when the layer does not exist).

ParameterTypeDefault
layerNamestringrequired

Returns IReadOnlyList<IClassic>.

Count

int ClassicApi.Count()

Number of objects of this kind in the active document.

Returns int.

Create

IClassic ClassicApi.Create(
    double width = 0,
    double height = 0,
    double fingerDiameter = 0,
    bool withGems = false,
    double gemSize = 0,
    double gemsAngle = 0,
    string profile = null,
    Plane? plane = null,
    string element = null)

Builds a classic ring shank (the ArtisanClassic tool, headless): a comfort-fit band at the document’s finger size, optionally with a row of gems around the top. This is the scriptable way to give a design its ring body. Millimetres; 0 keeps the tool default (or the user’s saved defaults): width 3, height 2. fingerDiameter 0 = the document’s configured finger size. withGems true enables the gem row (gemSize default 1.2 mm, gemsAngle default 180 degrees of the shank covered). profile picks a RING_PROFILE asset by name; omitted = the default profile. plane omitted = world XY. Returns an IClassic handle to the new shank. element = name of a saved Classic element (ElementsApi.List(“Classic”)) to start from instead of the tool defaults; explicit arguments override it.

ParameterTypeDefault
widthdouble0
heightdouble0
fingerDiameterdouble0
withGemsboolfalse
gemSizedouble0
gemsAngledouble0
profilestringnull
planePlane?null
elementstringnull

Returns IClassic.

Find

IClassic ClassicApi.Find(Guid id)

The handle for id, or null when the id does not belong to an object of this kind.

ParameterTypeDefault
idGuidrequired

Returns IClassic.

Selected

IReadOnlyList<IClassic> ClassicApi.Selected()

Classics currently selected in the active doc.

Returns IReadOnlyList<IClassic>.

Handles and sections

What the methods above hand back. A handle’s setters regenerate the object; wrap changes in a Transaction so they land as one undo step.

IClassic

Handle — extends IParametricObject.

Classic ring shank (multiple gems possible) — no single MotherGem.

PropertyType
AdvancedIClassicAdvancedget
BottomProfileIClassicProfileget
ExternalProfileIClassicExternalProfileget
GemsIClassicGemsget
IdGuidget(from IParametricObject)
LayerNamestringget(from IParametricObject)
MidProfileIClassicProfileget
MotherGemIdGuidget(from IParametricObject)
ObjectTypestringget(from IParametricObject)
PositionPoint3dget(from IParametricObject)
RingDiameterMmdoubleget
RingSizeLabelstringget
RingSizeRegionstringget
TopProfileIClassicProfilegetParameter sections — each is a live view over the shank’s stored parameters; their setters regenerate the shank in place (same Guid) and call LicenseGate.RequireValid() first. Millimetres.
Method
void Delete()(from IParametricObject)
void Move(Vector3d translation)(from IParametricObject)
void SetElement(string element)Applies a saved Classic element (ElementsApi.List(“Classic”)) to this shank: its parameters replace the current ones, the ring size stays, and the shank regenerates in place (same id).
void SetHeight(double height)
void SetWidth(double width)Shortcuts for the two most common edits — same effect as TopProfile.SetWidth / TopProfile.SetHeight.

IClassicProfile

Section.

One of the shank’s three section profiles (top / mid / bottom). The top profile is always enabled; mid and bottom are optional.

PropertyType
Comfortdoublegetmm — used when Type is “COMFORT”
Displacementdoublegetmm
Enabledboolget
Heightdoublegetmm
Orientationintget0 = Natural, 1 = Reverse (flips the profile curve)
ProfileNamestringgetRING_PROFILE asset name, "" when unset
Rotationdoublegetdegrees
Thicknessdoublegetmm — used when Type is “THICKNESS”
Typestringget”SOLID”, “COMFORT” or “THICKNESS”
Widthdoublegetmm
Method
void SetComfort(double comfort)
void SetDisplacement(double displacement)
void SetEnabled(bool enabled)
void SetHeight(double height)
void SetOrientation(int orientation)
void SetProfile(string assetName)RING_PROFILE asset by name — list them with AssetsApi.List(“RING_PROFILE”)
void SetRotation(double degrees)
void SetThickness(double thickness)
void SetType(string type)”SOLID”, “COMFORT” or “THICKNESS”
void SetWidth(double width)

IClassicGems

Section.

The gems row a shank can carry around its band.

PropertyType
Angledoublegetdegrees of the band covered by gems (180 = top half)
AutomaticProngDiameterboolget
BrightCutdoublegetbright-cut width, mm
DrillAllowIntersectionboolget
DrillHeightdoublegetmm
DrillTypestringget”NONE”, “ROUND” or “QUAD”
DrillWidthdoublegetmm
Enabledboolget
ExtensionForManufacturingdoublegetmm
GemInsidedoublegethow deep the gems sit inside, mm
GemShapestringget”ROUND”, “PRINCESS”, …
GemSizedoublegetmm
InnerHeightdoublegetinner channel height, mm
InnerWidthdoublegetinner channel width, mm
Margindoublegetside margin, mm
MinDistancedoublegetminimum distance between gems, mm
ProngDiameterdoublegetmm — used when AutomaticProngDiameter is false
ProngHeightdoublegetmm
ProngMoveInZdoublegetmm
ProngTypestringget”NONE”, “SHARED” or “SCALLOPED”
Verticaldoublegetvertical displacement of the row, mm
Method
void SetAngle(double degrees)
void SetAutomaticProngDiameter(bool automatic)
void SetBrightCut(double brightCut)
void SetDrillAllowIntersection(bool allow)
void SetDrillHeight(double height)
void SetDrillType(string drillType)”NONE”, “ROUND” or “QUAD”
void SetDrillWidth(double width)
void SetEnabled(bool enabled)
void SetExtensionForManufacturing(double extension)
void SetGemInside(double gemInside)
void SetGemShape(string shape)
void SetGemSize(double size)
void SetInnerHeight(double height)
void SetInnerWidth(double width)
void SetMargin(double margin)
void SetMinDistance(double distance)
void SetProngDiameter(double diameter)
void SetProngHeight(double height)
void SetProngMoveInZ(double move)
void SetProngType(string prongType)”NONE”, “SHARED” or “SCALLOPED”
void SetVertical(double vertical)

IClassicExternalProfile

Section.

The optional external profile carved on the shank’s outside face.

PropertyType
Bottomdoublegetexternal height at the bottom, mm
Enabledboolget
Middoublegetexternal height at the middle, mm
ProfileNamestringgetEXTERNAL_RING_PROFILE asset name, "" when unset
Topdoublegetexternal height at the top, mm
Method
void SetBottom(double height)
void SetEnabled(bool enabled)
void SetMid(double height)
void SetProfile(string assetName)EXTERNAL_RING_PROFILE asset by name — list them with AssetsApi.List(“EXTERNAL_RING_PROFILE”)
void SetTop(double height)

IClassicAdvanced

Section.

The classic shank’s Advanced section: the opening at the bottom of the band.

PropertyType
CutBumpingdoublegetmm — used when OpeningType is “CUT”
CutLengthdoublegetmm — used when OpeningType is “CUT”
OpeningTypestringget”NONE”, “CUT” or “STRANGLE”
StrangleBaseXdoublegetmm
StrangleBaseYdoublegetmm
StrangleBaseZdoublegetmm
StrangleOpeningdoublegetmm — used when OpeningType is “STRANGLE”
Method
void SetCutBumping(double bumping)
void SetCutLength(double length)
void SetOpeningType(string openingType)”NONE”, “CUT” or “STRANGLE”
void SetStrangleBase(double x, double y, double z)
void SetStrangleOpening(double opening)