FailureMessage Class

Represents a message describing a failure of an operation in Revit.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DBFailureMessage

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class FailureMessage : IDisposable

The FailureMessage type exposes the following members.

Constructors
 NameDescription
Public methodFailureMessage Creates a new FailureMessage related to a given FailureDefinition.
Top
Properties
 NameDescription
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
Top
Methods
 NameDescription
Public methodAddResolution Adds a resolution for the failure.
Public methodDisposeReleases all resources used by the FailureMessage
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetAdditionalElements Retrieves list of the additional reference elements for the failure.
Public methodGetDefaultResolutionCaption Retrieves the caption of the default resolution of the failure.
Public methodGetDescriptionText Retrieves the description text of the failure.
Public methodGetFailingElements Retrieves list of the elements that have caused the failure.
Public methodGetFailureDefinitionId Retrieves the id of the failure definition for the failure.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetSeverity Retrieves the severity of the failure.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodHasResolutionOfType Checks if failure has a resolution of a given type.
Public methodHasResolutions Checks if the failure has any resolutions.
Public methodSetAdditionalElement Sets the additional reference element for the failure.
Public methodSetAdditionalElements Sets the additional reference elements for the failure.
Public methodSetFailingElement Sets the element that has caused the failure.
Public methodSetFailingElements Sets elements that have caused the failure.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
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.
See Also