SelectionSet Class
A set of currently selected geometric elements, models and subcategories for an IModelConnection
.
Generally, selected elements are displayed with a customizable hilite effect within a Viewport, see HiliteSet.
@see Hilite.Settings for customization of the hilite effect.
Methods
Name | Description | |
---|---|---|
constructor(iModel: IModelConnection): SelectionSet | ||
add(adds: Id64Arg | SelectableIds): boolean | Add one or more Ids to the current selection set. | |
addAndRemove(adds: Id64Arg | SelectableIds, removes: Id64Arg | SelectableIds): boolean | Add one set of Ids, and remove another set of Ids. | |
emptyAll(): void | Clear current selection set. | |
has(elemId?: string): boolean | Return true if elemId is in this SelectionSet . |
Deprecated |
invert(ids: Id64Arg | SelectableIds): boolean | Invert the state of a set of Ids in the SelectionSet |
|
isSelected(elemId?: string): boolean | Query whether an Id is in the selection set. | Deprecated |
remove(removes: Id64Arg | SelectableIds): boolean | Remove one or more Ids from the current selection set. | |
replace(ids: Id64Arg | SelectableIds): boolean | Change selection set to be the supplied set of Ids. |
Properties
Name | Type | Description | |
---|---|---|---|
active Accessor ReadOnly | { elements: Set<string>, models: Set<string>, subcategories: Set<string> } | Get the active selection as a collection of geometric element, model and subcategory ids. | |
elements Accessor ReadOnly | Set<string> | The IDs of the selected elements. | |
iModel | IModelConnection | ||
isActive Accessor ReadOnly | boolean | Check whether there are any ids in this selection set. | |
models Accessor ReadOnly | Set<string> | The IDs of the selected models. | |
onChanged Readonly | BeEvent<(ev: SelectionSetEvent) => void> | Called whenever ids are added or removed from this SelectionSet |
|
size Accessor ReadOnly | number | Get the number of entries in this selection set. | |
subcategories Accessor ReadOnly | Set<string> | The IDs of the selected subcategories. |
Defined in
- core/frontend/src/SelectionSet.ts Line 324
Last Updated: 24 June, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.