Not applicable
12-07-2016
03:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is it possible to get a list of all the Revit warnings? The warnings that will appear in the Warning Inquiry window are warnings that appear in the model. However, I want the entire list. I want to find around 100 warning types and do not want 100 if statements, which would be required using the code I found:
void ControlledApplication_FailuresProcessing(object sender, Autodesk.Revit.DB.Events.FailuresProcessingEventArgs e) { FailuresAccessor accessor = e.GetFailuresAccessor(); IList<FailureMessageAccessor> messages = accessor.GetFailureMessages(); foreach (FailureMessageAccessor failure in messages) { FailureDefinitionId failId = failure.GetFailureDefinitionId(); if (failId == BuiltInFailures.OverlapFailures.WallsOverlap) { TaskDialog.Show("Deleting Failure", failure.GetDescriptionText()); accessor.DeleteWarning(failure); } } }
Ideally, I would just like a complete list of Warning Error Messages, then I can add the ones I care about finding to a list and use List.Contains.
Solved! Go to Solution.
Link copied