IFailuresPreprocessor Interface |
An interface that may be used to perform a preprocessing step to either filter out anticipated transaction failures
or to mark certain failures as non-continuable.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 27.0.4.0 (27.0.4.0)
Syntaxpublic interface IFailuresPreprocessor
Public Interface IFailuresPreprocessor
public interface class IFailuresPreprocessor
type IFailuresPreprocessor = interface end
The IFailuresPreprocessor type exposes the following members.
Methods| | Name | Description |
|---|
 | PreprocessFailures |
This method is called when there have been failures found at the end of a transaction and Revit is about to start processing them.
|
Top
Remarks
This interface, if provided, is invoked when there are failures found at the end of a transaction.
An instance of this interface can be set in the failure handling options of transaction object.
Examplepublic class RoomWarningSwallower : IFailuresPreprocessor
{
public FailureProcessingResult PreprocessFailures(FailuresAccessor failuresAccessor)
{
IList<FailureMessageAccessor> failList = new List<FailureMessageAccessor>();
failList = failuresAccessor.GetFailureMessages();
foreach (FailureMessageAccessor failure in failList)
{
FailureDefinitionId failID = failure.GetFailureDefinitionId();
if (failID == BuiltInFailures.RoomFailures.RoomNotEnclosed)
{
failuresAccessor.DeleteWarning(failure);
}
}
return FailureProcessingResult.Continue;
}
}
See Also