.NET API
BooleanUpdateApi
Headless ArtisanBooleanUpdate. An Artisan boolean (BooleanApi or the ArtisanBoolean* commands) lives in a group whose RaObjectUserData stores the operation and the operand ids; ArtisanEdit “dismantles” it (deletes the result, shows the operands, keeps the empty group). Update rebuilds those dismantled booleans from the stored operands and hides them again. Where the command asks the user to reselect an operand whose id died (a parametric edit recreated the object), the API takes replacements (old id -> new id) and stores the new ids back, exactly like the command.
from ArtisanPlugin.Scripting import BooleanUpdateApi
See also the Python package, ra.boolean.
Methods
| Method | |
|---|---|
ListDismantled | Read-only: the dismantled Artisan booleans in the document (boolean groups with no members), with their operation, stored operand ids and the operand ids that no longer exist (those need replacements in Update). |
Update | Rebuilds one dismantled boolean by its unique id (see ListDismantled). |
UpdateAll | Rebuilds every dismantled Artisan boolean (the ArtisanBooleanUpdate command, no prompts): recomputes each one from its stored operands, puts the result breps back in the boolean group and hides the operands. |
ListDismantled
IReadOnlyList<DismantledBoolean> BooleanUpdateApi.ListDismantled()
Read-only: the dismantled Artisan booleans in the document (boolean groups with no members), with their operation, stored operand ids and the operand ids that no longer exist (those need replacements in Update). Id is the boolean’s unique id (RaObjectUserData.Unique).
Returns IReadOnlyList<DismantledBoolean>.
Update
UpdateResult BooleanUpdateApi.Update(
Guid booleanId,
IDictionary<string, string> replacements = null)
Rebuilds one dismantled boolean by its unique id (see ListDismantled). replacements maps a dead operand id to the object that replaces it (old id -> new id, as strings); the new ids are stored in the boolean so later updates work without them. Returns counts and result ids.
| Parameter | Type | Default |
|---|---|---|
booleanId | Guid | required |
replacements | IDictionary<string, string> | null |
Returns UpdateResult.
UpdateAll
UpdateResult BooleanUpdateApi.UpdateAll()
Rebuilds every dismantled Artisan boolean (the ArtisanBooleanUpdate command, no prompts): recomputes each one from its stored operands, puts the result breps back in the boolean group and hides the operands. Booleans with a dead operand id or a failed computation are skipped and reported in Messages. Returns counts and the result ids.
Returns UpdateResult.