Retrieve the list of the lists by selected list (retrieve warning description per selected elements)

#1

Hi;

On the Active View, I’d like to check out Elements in selected Category ( in this graph, I tried to get ‘Doors’) which have the warnings. I used ‘Element.ID’ to sort out Elements. But, I want to know the warning description that the selected Elements belong to. But, I can’t do ( or match the sublist to the selected list). Can you help me to proceed this work?
Thank you.

Dynamo : v2.0.2 Revit: 2019 Window 10
You can test the graph on any project file.

Select Elements by Category in Warning message in Active View.dyn (62.9 KB)

#2

I think this will work.

Not sure where you got doc.warnings to test.

#3

Steven;

I tested your graph, but I got the error message on ‘List.SortByKeys’
As you can see, the list of warning description and list of the failing elements are not same because the list is flatten.
If I have to use ‘List.SortByKeys’, I have to use ‘WarningTools.GetWarnings’ as their list structure is same. The sublist of failing elements have diverse elements so the flatten list is bigger than the warning description list.

Test for Solution.dyn (31.4 KB)

#4

This should work.

#5

Steven;

Thank you for the solution. It works.
In the active view, I can get doors which has the warnings and retrieve the warning description to the selected door elements.
Filtered By Boolean on the warning list & the failing element sublist, I got the doors in active views and doors in conflict with them together.
That is better as I can check out doors on the view and doors in duplication warning with them.
I found two doors on the view for ‘identical instance’ warning - last warning.
Thanks again.

Select Elements by Category in Warning message in Active View_02.dyn (44.9 KB)

#6

No problem @Hyun_Tak. Can you mark the post that solved your solution as solved for anyone else who comes looking?

Thanks,