deleteElementSubTrees Function

Deletes all element sub-trees that are selected by the supplied filter. Uses ElementSubTreeDeleter. If the filter selects the top element itself, then the entire tree (including the top element) is deleted. That has the same effect as calling deleteElementTree on the top element.

deleteElementSubTrees(iModel: IModelDb, topElement: string, filter: ElementSubTreeDeleteFilter): void

@note The caller may have to call this function multiple times if there are multiple layers of dependencies among definition elements.

Parameter Type Description
iModel IModelDb The iModel
topElement string Where to start the search.
filter ElementSubTreeDeleteFilter Callback that selects sub-trees that should be deleted.

Returns - void

Defined in

Last Updated: 17 December, 2024