Last Chance To Claim LIFETIME ACCESS. (Only ~50 Seats Left)
Resources
Sep 20, 2022
Get Warnings with RevitAPI
How to get Warnings and associated elements with Revit API + Python.
Get and Sort Warnings by Type
Getting warning is not complicated, but it would make more sense to sort them by warnings types. Whenever you are going to work with warnings, you will want to focus on some types more than on others. So let's get them and sort in a dictionary.
Now we have a dictionary that has warning description as a Key and a list of all warnings as a value.
We might want to get elements associated with these warnings with the following snippet.
Verify Element
Lastly, before making changes to the set of associated elements, make sure that these elements are modifiable.
For example, if you would want to Hide or Isolate these elements, you might need to check if that would even be possible.
e.g. element.CanBeHidden(View)
Join Newsletter
📩 You will be added to Revit API Newsletter
Join Us!
which is already read by 6800+ people!