Segregating Wooden doors from glass doors from a project

Hi there, I was trying to segregate doors with respect to their material, However i see the list count go from 16 to 32 as there are 2 material for each door. Can anyone help Figure out, how the filter the list and segregate the doors. (in the attached work space i did arrive at the sat of elements However they are a mix of glass an wooden doors)

You need to provide a single boolean per door element. After checking for materials with Glass as the name, you need to determine if any of the materials met that requirement (per sublist). You can use List.AnyTrue to do that.

Hey @Nick_Boyts
Thanks for the reply, I was a little confused on how to apply it for every door element, I did give it a try but no luck. Please correct me if what I have done is not what u conveyed.

Thanks in advanced



.

The second image is correct except that you need to use the appropriate list levels (@L2) so that List.AnyTrue checks each individual sublist, instead of the whole list like it is now.

I tried to add the List levels @L2 to Material.Name and math == (in combinations and to individual nodes), but neither provide the require outcome of segregating the doors.

You need to set the list levels of the List.AnyTrue node since that’s the node where you want to check each (@L2) sublist.

Yes, I have that that aswell, but no luck.

I also found out a node that helped filter (List.GetItemAtIndex) that made it easier to cross check the true and false. But for some reason at the end


it seems to generate Both glass an wooden doors.

You’re changing the list structure now. The whole point is that each element has multiple materials so you have to check if that list of materials contains glass or wood.

Ok, but although we don’t change the list structure, it doesn’t seems to help. It is resulting in all doors being true and reflecting in the 3D. I am not sure if i am missing anything.


Can you show the outputs from the filter node? Can you also confirm there are doors with no Glass material?


I hope this is what you mean by Output.
Yes, I am using a Revit basic Sample project to develop this script, and there are wooden doors that do not have any glass material on them.

Based on the last two images you’ve shown the list is getting filtered properly. It looks like you still have all your node geometry previews turned on though, which means they’re all going to show. If you only want to view the filtered geometry then you need to hide everything else.