HiliteSet Class

A set of hilited elements for an IModelConnection, by element id. Hilited elements are displayed with a customizable hilite effect within a Viewport. The set exposes 3 types of elements in 3 separate collections: GeometricElement, GeometricModel, and SubCategory. The HiliteSet.models and HiliteSet.subcategories can be hilited independently or as an intersection of the two sets, as specified by HiliteSet.modelSubCategoryMode.

Technically, the hilite effect is applied to Features, not Elements. An element's geometry stream can contain multiple features belonging to different subcategories.

Because Javascript lacks efficient support for 64-bit integers, the Ids are stored as pairs of 32-bit integers via Id64.Uint32Set.

note Typically, elements are hilited by virtue of their presence in the IModelConnection's SelectionSet. The HiliteSet allows additional elements to be displayed with the hilite effect without adding them to the SelectionSet. If you add elements to the HiliteSet directly, you are also responsible for removing them as appropriate.

see IModelConnection.hilited for the HiliteSet associated with an iModel.

see Hilite.Settings for customization of the hilite effect.

extensions

Methods

Name Description
clear(): void Remove all elements from the hilited set.  
setHilite(arg: Id64Arg, onOff: boolean): void Toggle the hilited state of one or more elements.  

Properties

Name Type Description
elements Accessor ReadOnly Uint32Set The set of hilited elements.  
iModel IModelConnection    
isEmpty Accessor ReadOnly boolean Returns true if nothing is hilited.  
models Readonly Uint32Set The set of hilited GeometricModelStates.  
modelSubCategoryMode Accessor ModelSubCategoryHiliteMode Controls how the sets of hilited HiliteSet.models and HiliteSet.subcategories interact with one another.  
onModelSubCategoryModeChanged Readonly BeEvent<(newMode: ModelSubCategoryHiliteMode) => void> Event raised just before changing the value of HiliteSet.modelSubCategoryMode.  
subcategories Readonly Uint32Set The set of hilited subcategories.  
wantSyncWithSelectionSet Accessor boolean Control whether the hilited elements will be synchronized with the contents of the SelectionSet.  

Defined in

Last Updated: 19 August, 2022