SelectionManager Class

The selection manager which stores the overall selection.

Implements

Methods

Name Description
constructor(props: SelectionManagerProps): SelectionManager Creates an instance of SelectionManager.  
addToSelection(source: string, imodel: IModelConnection, keys: Keys, level: number0, rulesetId?: string): void Add keys to the selection  
addToSelectionWithScope(source: string, imodel: IModelConnection, ids: Id64Arg, scope: string | SelectionScopeProps | SelectionScope, level: number0, rulesetId?: string): Promise<void> Add keys to selection after applying selection scope on them.  
clearSelection(source: string, imodel: IModelConnection, level: number0, rulesetId?: string): void Clear current selection  
dispose(): void    
getHiliteSet(imodel: IModelConnection): Promise<HiliteSet> Get the current hilite set for the specified imodel  
getHiliteSetIterator(imodel: IModelConnection): AsyncIterableIterator<HiliteSet, any, any> Get the current hilite set iterator for the specified imodel.  
getSelection(imodel: IModelConnection, level: number0): Readonly<KeySet> Get the selection currently stored in this manager  
getSelectionLevels(imodel: IModelConnection): number[] Get the selection levels currently stored in this manager for the specified imodel  
removeFromSelection(source: string, imodel: IModelConnection, keys: Keys, level: number0, rulesetId?: string): void Remove keys from current selection  
removeFromSelectionWithScope(source: string, imodel: IModelConnection, ids: Id64Arg, scope: string | SelectionScopeProps | SelectionScope, level: number0, rulesetId?: string): Promise<void> Remove keys from current selection after applying selection scope on them.  
replaceSelection(source: string, imodel: IModelConnection, keys: Keys, level: number0, rulesetId?: string): void Replace current selection  
replaceSelectionWithScope(source: string, imodel: IModelConnection, ids: Id64Arg, scope: string | SelectionScopeProps | SelectionScope, level: number0, rulesetId?: string): Promise<void> Replace current selection with keys after applying selection scope on them.  
setSyncWithIModelToolSelection(imodel: IModelConnection, sync: booleantrue): void Request the manager to sync with imodel's tool selection (see IModelConnection.selectionSet).  
suspendIModelToolSelectionSync(imodel: IModelConnection): IDisposable Temporarily suspends tool selection synchronization until the returned IDisposable  

Properties

Name Type Description
scopes Readonly SelectionScopesManager Manager for selection scopes  
selectionChange Readonly SelectionChangeEvent An event which gets broadcasted on selection changes  

Defined in

Last Updated: 14 November, 2024