.NET API
WeddingApi
Wedding sets — his-and-hers pairs baked as one group. Query-only for now: run ArtisanWeddingRing in the UI once, then script every variant from the handle it leaves behind.
from ArtisanPlugin.Scripting import WeddingApi
See also the guide, Shanks › Wedding, and the Python package, ra.wedding.
Methods
| Method | |
|---|---|
All | IWedding handles for every object of this kind in the active document (empty when there is no document). |
ByLayer | IWedding handles on the layer with the given full path (empty when the layer does not exist). |
Count | Number of objects of this kind in the active document. |
Find | The handle for id, or null when the id does not belong to an object of this kind. |
Selected | IWedding handles for the objects of this kind currently selected in the active document. |
All
IReadOnlyList<IWedding> WeddingApi.All()
IWedding handles for every object of this kind in the active document (empty when there is no document).
Returns IReadOnlyList<IWedding>.
ByLayer
IReadOnlyList<IWedding> WeddingApi.ByLayer(string layerName)
IWedding handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | Default |
|---|---|---|
layerName | string | required |
Returns IReadOnlyList<IWedding>.
Count
int WeddingApi.Count()
Number of objects of this kind in the active document.
Returns int.
Find
IWedding WeddingApi.Find(Guid id)
The handle for id, or null when the id does not belong to an object of this kind.
| Parameter | Type | Default |
|---|---|---|
id | Guid | required |
Returns IWedding.
Selected
IReadOnlyList<IWedding> WeddingApi.Selected()
IWedding handles for the objects of this kind currently selected in the active document.
Returns IReadOnlyList<IWedding>.
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.
Also used here: IWeddingRing, IWeddingProfile, IWeddingGems.
IWedding
Handle — extends IParametricObject.
A wedding set: the two rings baked together as one group.
| Property | Type | ||
|---|---|---|---|
FirstRing | IWeddingRing | get | |
Id | Guid | get | (from IParametricObject) |
LayerName | string | get | (from IParametricObject) |
MotherGemId | Guid | get | (from IParametricObject) |
ObjectType | string | get | (from IParametricObject) |
Position | Point3d | get | (from IParametricObject) |
Region | string | get | sizing region of the set, "" when unset |
SecondRing | IWeddingRing | get |
| Method | |
|---|---|
void Delete() | (from IParametricObject) |
void Move(Vector3d translation) | (from IParametricObject) |