DeleteEntity Method


Deletes the existing entity created by %schema% in the element

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)

Syntax

C#
public bool DeleteEntity(
	Schema schema
)
Visual Basic
Public Function DeleteEntity ( _
	schema As Schema _
) As Boolean
Visual C++
public:
bool DeleteEntity(
	Schema^ schema
)

Parameters

schema
Type: Autodesk.Revit.DB.ExtensibleStorage Schema
Schema used for creation of the entity

Return Value

True if entity was deleted, false if entity didn't exist

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException Writing of Entities of this Schema is not allowed to the current add-in.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL

See Also