Skip to content

.NET API

UserElementApi

User elements (the ArtisanUserElement tool): named groups of document objects tagged with UserElement data so the Outliner lists them. The elements live IN the document — there is no on-disk library and no insert-by-name flow, so this Api mirrors what the tool actually does: tag an existing selection as a named element, and list the ones the active document already has.

from ArtisanPlugin.Scripting import UserElementApi

See also the guide, Accessories › User element, and the Python package, ra.user_element.

Methods

Method
CreateTags the given objects as a user element named name (the tool’s whole flow: group them, attach the UserElement user data, and give non-gem solid geometry the metal material).
ListNames of the user elements in the active document (read-only).

Create

Guid UserElementApi.Create(IEnumerable<Guid> objectIds, string name)

Tags the given objects as a user element named name (the tool’s whole flow: group them, attach the UserElement user data, and give non-gem solid geometry the metal material). Returns the element’s unique id.

ParameterTypeDefault
objectIdsIEnumerable<Guid>required
namestringrequired

Returns Guid.

List

IReadOnlyList<string> UserElementApi.List()

Names of the user elements in the active document (read-only).

Returns IReadOnlyList<string>.