SetFailingElement Method


Sets the element that has caused the failure.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2011

Syntax

C#
public FailureMessage SetFailingElement(
	ElementId id
)
Visual Basic
Public Function SetFailingElement ( _
	id As ElementId _
) As FailureMessage
Visual C++
public:
FailureMessage^ SetFailingElement(
	ElementId^ id
)

Parameters

id
Type: Autodesk.Revit.DBElementId
The element that has caused the failure.

Return Value

The FailureMessage.

Remarks

In Revit error dialog this element will be highlighted to the user and can be deleted by user via extended error dialog.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException This FailureMessage is already posted to a document

See Also