.NET API
WeddingBandApi
Single wedding bands.
from ArtisanPlugin.Scripting import WeddingBandApi
See also the Python package, ra.wedding_band.
Methods
| Method | |
|---|---|
All | IWeddingBand handles for every object of this kind in the active document (empty when there is no document). |
ByLayer | IWeddingBand 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 | IWeddingBand handles for the objects of this kind currently selected in the active document. |
All
IReadOnlyList<IWeddingBand> WeddingBandApi.All()
IWeddingBand handles for every object of this kind in the active document (empty when there is no document).
Returns IReadOnlyList<IWeddingBand>.
ByLayer
IReadOnlyList<IWeddingBand> WeddingBandApi.ByLayer(string layerName)
IWeddingBand handles on the layer with the given full path (empty when the layer does not exist).
| Parameter | Type | Default |
|---|---|---|
layerName | string | required |
Returns IReadOnlyList<IWeddingBand>.
Count
int WeddingBandApi.Count()
Number of objects of this kind in the active document.
Returns int.
Find
IWeddingBand WeddingBandApi.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 IWeddingBand.
Selected
IReadOnlyList<IWeddingBand> WeddingBandApi.Selected()
IWeddingBand handles for the objects of this kind currently selected in the active document.
Returns IReadOnlyList<IWeddingBand>.
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.
IWeddingBand
Handle — extends IParametricObject.
A single wedding band.
| Property | Type | ||
|---|---|---|---|
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, "" when unset |
Ring | IWeddingRing | get |
| Method | |
|---|---|
void Delete() | (from IParametricObject) |
void Move(Vector3d translation) | (from IParametricObject) |
void SetElement(string element) | Applies a saved WeddingBand element (ElementsApi.List(“WeddingBand”)) to this band: its profile, gems and metal replace the current ones, the ring size stays, and the band regenerates in place (same id). |