ElementTreeDeleter Class

Deletes an entire element tree, including sub-models and child elements. Items are deleted in bottom-up order. Definitions and Subjects are deleted after normal elements. Call deleteNormalElements on each tree. Then call deleteSpecialElements.

@see deleteElementTree for a simple way to use this class.

Extends

Methods

Name Description
constructor(_iModel: IModelDb): ElementTreeDeleter    
deleteNormalElements(topElement: string, scope?: ElementTreeWalkerScope): void Delete the "normal" elements and record the special elements for deferred processing.  
deleteSpecialElements(): void Delete all special elements that were found and deferred by deleteNormalElements.  
shouldExploreModel(_model: Model): boolean Protected Return true if the search should recurse into this model  
shouldVisitElement(_elementId: string): boolean Protected Return true if the search should visit this element  
visitElement(elementId: string, _scope: ElementTreeWalkerScope): void Protected Called to visit an element  
visitModel(model: Model, _scope: ElementTreeWalkerScope): void Protected Called to visit a model  

Inherited methods

Name Inherited from Description
processElementTree(element: string, scope: ElementTreeWalkerScope): void Protected ElementTreeBottomUp The main tree-walking function
shouldExploreChildren(_parentId: string, _scope: ElementTreeWalkerScope): boolean Protected ElementTreeBottomUp Return true if the search should recurse into the children (if any) of this element
shouldVisitModel(_model: Model, _scope: ElementTreeWalkerScope): boolean Protected ElementTreeBottomUp Return true if the search should visit this model

Properties

Name Type Description
_special Protected SpecialElements    

Inherited properties

Name Type Inherited from Description
_iModel Protected IModelDb ElementTreeBottomUp  

Defined in

Last Updated: 19 April, 2024