DeleteElements Method


Failures Accessor Delete Elements Method

Resolves failures by deletion of elements related to the failures.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntax
public void DeleteElements(
	IList<ElementId> idsToDelete
)

Parameters

idsToDelete IList ElementId
Ids of elements to be deleted.
Exceptions
Exception Condition
ArgumentException Resolution of the failures by deleting idsToDelete is not permitted
ArgumentNullException A non-optional argument was null
InvalidOperationException This FailuresAccessor is inactive (is used outside of failures processing).
See Also
ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →