Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
Is there any method where I can suppress FailureMessages on opening of a model?
I realise there is a method during a transation where the FailureMessage can be Deleted eg:
Dim failMessages As IList(Of FailureMessageAccessor) = failuresAccessor.GetFailureMessages()
For Each fma As FailureMessageAccessor In failMessages
failure
If fma.GetFailureDefinitionId = BuiltInFailures.RoomFailures.RoomNotEnclosed Then
failuresAccessor.DeleteWarning(fma)
End If
NextHowever from what I undestand this can only be called during a transation eg:
Using Transaction As New Transaction(e.Document, "Handle Document Opened Failures")
Dim failOpt As FailureHandlingOptions = Transaction.GetFailureHandlingOptions
failOpt.SetFailuresPreprocessor(New SuppressRoomFailures)
Transaction.SetFailureHandlingOptions(failOpt)
Transaction.Start()
Transaction.Commit()
End UsingIs there any way the warning can be suppressed without needing a transation e.g. from the DocumentOpened event?
I also need the same from space not enclosed but I can't seem to find SpaceNotEnclosed.
Kind Regards
David
Solved! Go to Solution.