FailuresAccessorReplaceFailures Method |
Deletes all failure messages currently posted in a document and replaces them with one "generic" failure.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntaxpublic void ReplaceFailures(
FailureMessage failure
)
Public Sub ReplaceFailures (
failure As FailureMessage
)
public:
void ReplaceFailures(
FailureMessage^ failure
)
member ReplaceFailures :
failure : FailureMessage -> unit
Parameters
- failure FailureMessage
-
FailureMessage that should replace all currently posted messages. It must have severity DocumentCorruption.
Exceptions
Remarks
If analysis done by Failures Processing code concludes that in a given context delivering
of the posted failures to the user makes no sense, this method can be used to discard all posted failures
and substitute one "generic" one, that will be delivered to the user and then transaction
forced to be aborted.
After the call, (pre)processing of failures should return ProceedWithRollback.
See Also