SelectionSet Class

A set of currently selected elements for an IModelConnection. Selected elements are displayed with a customizable hilite effect within a Viewport.

see Hilite.Settings for customization of the hilite effect.

Methods

Name Description
constructor(iModel: IModelConnection): SelectionSet    
add(elem: Id64Arg): boolean Add one or more Ids to the current selection set.  
addAndRemove(adds: Id64Arg, removes: Id64Arg): 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.  
invert(elem: Id64Arg): boolean Invert the state of a set of Ids in the SelectionSet  
isSelected(elemId?: Id64String): boolean Query whether an Id is in the selection set.  
remove(elem: Id64Arg): boolean Remove one or more Ids from the current selection set.  
replace(elem: Id64Arg): void Change selection set to be the supplied set of Ids.  

Properties

Name Type Description
elements Accessor ReadOnly Set<string> The IDs of the selected elements.  
iModel ConstructorProperty IModelConnection    
isActive Accessor ReadOnly boolean Check whether there are any selected elements.  
onChanged BeEvent<(ev: SelectionSetEvent) => void> Called whenever elements are added or removed from this SelectionSet  
size Accessor ReadOnly number Get the number of entries in this selection set.  

Defined in

Last Updated: 08 January, 2020