2026 Class
Changes 0
C

FailureMessage

Description:
Represents a message describing a failure of an operation in Revit.
Remarks:
Failure messages are typically shown to the user in the Revit error dialog. This class contains the following information about the failures:
  1. The basic description of the failure (retrieved from the FailureDefinition)
  2. The available resolutions for the failure.
  3. The elements related to the failure.
Inheritance Hierarchy:
System.Object
  Autodesk.Revit.DB.FailureMessage
public class FailureMessage : IDisposable
Name Return Type Description Inherited From
C FailureMessage(FailureDefinitionId) None Creates a new FailureMessage related to a given FailureDefinition.
Name Return Type Description Inherited From
M AddResolution(FailureResolutionType, FailureResolution) FailureMessage Adds a resolution for the failure.
M Dispose() None Releases all resources used by the FailureMessage
M Equals None Determines whether the specified object is equal to the current object. (Inherited from Object ) Object
M GetAdditionalElements() ICollection<ElementId> Retrieves list of the additional reference elements for the failure.
M GetDefaultResolutionCaption() String Retrieves the caption of the default resolution of the failure.
M GetDescriptionText() String Retrieves the description text of the failure.
M GetFailingElements() ICollection<ElementId> Retrieves list of the elements that have caused the failure.
M GetFailureDefinitionId() FailureDefinitionId Retrieves the id of the failure definition for the failure.
M GetHashCode None Serves as the default hash function. (Inherited from Object ) Object
M GetSeverity() FailureSeverity Retrieves the severity of the failure.
M GetType None Gets the Type of the current instance. (Inherited from Object ) Object
M HasResolutionOfType(FailureResolutionType) Boolean Checks if failure has a resolution of a given type.
M HasResolutions() Boolean Checks if the failure has any resolutions.
M SetAdditionalElement(ElementId) FailureMessage Sets the additional reference element for the failure.
M SetAdditionalElements(ICollection<ElementId>) FailureMessage
M SetFailingElement(ElementId) FailureMessage Sets the element that has caused the failure.
M SetFailingElements(ICollection<ElementId>) FailureMessage
M ToString None Returns a string that represents the current object. (Inherited from Object ) Object
Name Return Type Description Inherited From
P IsValidObject Boolean Specifies whether the .NET object represents a valid Revit entity.