FailuresAccessor
An interface class that provides access to failure information posted in a document and methods to resolve these failures.
Inheritance Hierarchy
System.Object
Autodesk.Revit.DB.FailuresAccessor
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class FailuresAccessor : IDisposableThe FailuresAccessor type exposes the following members.
Properties
Name
Description
Public Property
IsValidObject
Specifies whether the .NET object represents a valid Revit entity.
Methods
Name
Description
Public Method
CanCommitPendingTransaction
Checks if pending failure processing can be finished by committing a pending transaction.
Public Method
CanRollBackPendingTransaction
Checks if pending failure processing can be finished by rolling back a pending transaction.
Public Method
CommitPendingTransaction
Finishes pending failures processing by committing the pending transaction.
Public Method
DeleteAllWarnings
Deletes all FailureMessages of severity “Warning” currently posted in a document.
Public Method
DeleteElements
Resolves failures by deletion of elements related to the failures.
Public Method
DeleteWarning
Deletes one specific failure message of severity “Warning”.
Public Method
Dispose
Releases all resources used by the FailuresAccessor
Public Method
Equals
Determines whether the specified object is equal to the current object.
(Inherited from Object)
Public Method
GetAttemptedResolutionTypes
Returns list of the failure resolution types attempted for the failure in the current transaction.
Public Method
GetDocument
Provides access to a document for which failures are being processed or preprocessed.
Public Method
GetFailureHandlingOptions
Provides access to the failure handling options for the transaction currently being finished.
Public Method
GetFailureMessages.
Provides access to the individual failure messages currently posted in the document.
Public Method
GetFailureMessages(FailureSeverity)
Provides access to the individual failure messages if a given severity currently posted in the document.
Public Method
GetHashCode
Serves as the default hash function.
(Inherited from Object)
Public Method
GetSeverity
Provides access to the current failure severity.
Public Method
GetTransactionName
Retrieves the name of the transaction for which failures are being processed.
Public Method
GetType
Gets the Type of the current instance.
(Inherited from Object)
Public Method
IsActive
Method allows to check if this instance of the accessor is currently active.
Public Method
IsElementsDeletionPermitted.
Checks if resolution of the failures by deleting failure elements is permitted.
Public Method
IsElementsDeletionPermitted(IList.ElementId.)
Checks if resolution of the failures by deleting given collection of elements is permitted.
Public Method
IsElementsDeletionPermitted(IList.ElementId., String.)
Checks if resolution of the failures by deleting given collection of elements is permitted.
Public Method
IsFailureResolutionPermitted.
Checks if resolution of failures is permitted.
Public Method
IsFailureResolutionPermitted(FailureMessageAccessor)
Checks if default resolution of the failure is permitted.
Public Method
IsFailureResolutionPermitted(FailureMessageAccessor, FailureResolutionType)
Checks if resolution of the failure using given resolution type is permitted.
Public Method
IsPending
Checks if the failure processing is pending.
Public Method
IsTransactionBeingCommitted
Checks if the transaction for which failures are processed is being committed or rolled back.
Public Method
JournalFailures
Allows to record information about failures in the journal.
Public Method
PostFailure
Posts an additional failure message to be processed for the current transaction.
Public Method
ReplaceFailures
Deletes all failure messages currently posted in a document and replaces them with one “generic” failure.
Public Method
ResolveFailure
Resolves one failure using the failure resolution type last set for it.
Public Method
ResolveFailures
Resolves one or more failures using last set failure resolution type for each of the failures. If failure resolution type was not set for some of failures, default failure resolution type will be used.
Public Method
RollBackPendingTransaction
Finishes pending failures processing by rolling back the pending transaction.
Public Method
SetFailureHandlingOptions
Sets failure handling options for the transaction currently being finished.
Public Method
SetTransactionName
Changes the name of the transaction for which failures are being processed.
Public Method
ToString
Returns a string that represents the current object.
(Inherited from Object)
Remarks
An instance of this class can be obtained only as an argument passed to interfaces used in the process of failure resolution and is the only available interface to fetch information about failures in a document. While reading from a document during failure processing is allowed, the only way to modify document during failure resolution is via methods provided by this class. After returning from failure processing, the instance of the class is deactivated and cannot be used any longer.