Represents a message describing a failure of an operation in Revit.
Inheritance Hierarchy
System.ObjectAutodesk.Revit.DB.FailureMessage
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.4.0.0 (26.4.0.0)
Syntax
C#
public class FailureMessage : IDisposable
The FailureMessage type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| FailureMessage | Creates a new FailureMessage related to a given FailureDefinition. |
Properties
| Name | Description | |
|---|---|---|
| IsValidObject | Specifies whether the .NET object represents a valid Revit entity. |
Methods
| Name | Description | |
|---|---|---|
| AddResolution | Adds a resolution for the failure. | |
| Dispose | Releases all resources used by the FailureMessage | |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) | |
| GetAdditionalElements | Retrieves list of the additional reference elements for the failure. | |
| GetDefaultResolutionCaption | Retrieves the caption of the default resolution of the failure. | |
| GetDescriptionText | Retrieves the description text of the failure. | |
| GetFailingElements | Retrieves list of the elements that have caused the failure. | |
| GetFailureDefinitionId | Retrieves the id of the failure definition for the failure. | |
| GetHashCode | Serves as the default hash function. (Inherited from Object) | |
| GetSeverity | Retrieves the severity of the failure. | |
| GetType | Gets the Type of the current instance. (Inherited from Object) | |
| HasResolutionOfType | Checks if failure has a resolution of a given type. | |
| HasResolutions | Checks if the failure has any resolutions. | |
| SetAdditionalElement | Sets the additional reference element for the failure. | |
| SetAdditionalElements | Sets the additional reference elements for the failure. | |
| SetFailingElement | Sets the element that has caused the failure. | |
| SetFailingElements | Sets elements that have caused the failure. | |
| ToString | Returns a string that represents the current object. (Inherited from Object) |
Remarks
Failure messages are typically shown to the user in the Revit error dialog. This class contains the following information about the failures:- The basic description of the failure (retrieved from the FailureDefinition)
- The available resolutions for the failure.
- The elements related to the failure.
