deleteDefinitionElements Method

DefinitionElements can only be deleted if it can be determined that they are not referenced by other Elements. This usage query can be expensive since it may involve scanning the GeometryStreams of all GeometricElements. Since IModelDb.Elements.deleteElement does not perform these additional checks, it fails in order to prevent potentially referenced DefinitionElements from being deleted. This method performs those expensive checks and then calls delete if not referenced.

deleteDefinitionElements(definitionElementIds: Id64Array): Id64Set

@returns An IdSet of the DefinitionElements that are used and were therefore not deleted.

@see IModelDb.Elements.deleteElement

Parameter Type Description
definitionElementIds Id64Array  

Returns - Id64Set

An IdSet of the DefinitionElements that are used and were therefore not deleted.

Defined in

Last Updated: 17 December, 2024