FailureMessage
Description:
Represents a message describing a failure of an operation in Revit.
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:
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.
public class FailureMessage : IDisposable
| Name | Return Type | Description |
|---|---|---|
| FailureMessage(FailureDefinitionId) | None | Creates a new FailureMessage related to a given FailureDefinition. |
| Name | Return Type | Description |
|---|---|---|
| AddResolution(FailureResolutionType, FailureResolution) | The FailureMessage. | Adds a resolution for the failure. |
| Dispose() | None | Releases all resources used by the |
| GetAdditionalElements() | The additional elements. | Retrieves list of the additional reference elements for the failure. |
| GetDefaultResolutionCaption() | string | Retrieves the caption of the default resolution of the failure. |
| GetDescriptionText() | The description text. | Retrieves the description text of the failure. |
| GetFailingElements() | ICollection<ElementId> | Retrieves list of the elements that have caused the failure. |
| GetFailureDefinitionId() | FailureDefinitionId | Retrieves the id of the failure definition for the failure. |
| GetSeverity() | FailureSeverity | Retrieves the severity of the failure. |
| HasResolutionOfType(FailureResolutionType) | bool | Checks if failure has a resolution of a given type. |
| HasResolutions() | bool | Checks if the failure has any resolutions. |
| SetAdditionalElement(ElementId) | The FailureMessage. | Sets the additional reference element for the failure. |
| SetAdditionalElements(ICollection<ElementId>) | The FailureMessage. | Sets the additional reference elements for the failure. |
| SetFailingElement(ElementId) | The FailureMessage. | Sets the element that has caused the failure. |
| SetFailingElements(ICollection<ElementId>) | The FailureMessage. | Sets elements that have caused the failure. |
| Name | Return Type | Description |
|---|---|---|
| IsValidObject | bool | Specifies whether the .NET object represents a valid Revit entity. |