RIR extract frames and glazing from windows

Hi guys

I would like to separate my window into glazing panes and frame respectively. I started building my script using the revit sample house, where the following approach could be used to separate the windows correctly


However, this trick does not work for window families with multiple panes

I do not think that separating according to the subcategory is a good approach, as I experience that window families aren’t always separated into subcategories… So my though is that the best approach would be to separate the window components based on whether the Revit material is transparent as a transparency is always given to the panes. But I haven’t managed to do this correctly yet.

Here two of my many failed attempts.

This one simply gives you all the 1250 breps again despite using a RIR filter

This one just removes every third brep from the list

Any good suggestions on the best way to do this?



The data trees aren’t going to match with the transparency approach. Ensuring that the window families have the proper subcategories will maintain the proper data trees you need.

Hi Japhy

Yes, I do realize that the main problem is, that the data trees don’t match using my approach. I just tried looking at the categories as you suggested, but as you see, it seems like the architect has tagged frames correctly, while the glazing doesn’t appear as a subcategory for any of the windows in this entire project. I am a consulting engineer, so my job is simply to analyse the design proposals - I don’t model at all. If we did all the modelling ourselves, it would be possible to simply categorize the objects correctly, but as we always work on models created by others, it is much harder to dictate how the objects should be modelled :confused:

The ideal situation would be, if I could assess the material properties after using the Element Geometry component. That way the data trees would match.
But I guess that isn’t possible, right?

Is there another way to decompose a window family?

If you right click and bake (or use elefront bake) it creates blocks with the geometry on the correct layers, would that work in this case?

Hi Japhy

I just tried baking windows for a couple of different models.
In some instances, the window was sub-divided correctly, but this did not seem to be the case always. So I think that the window is baked correctly, if the sub-categories are assigned correctly. But in the example in the picture below, the architect has not chosen a subcategory for the glazing, so the glazing units are places under the parent “Windows” layer :confused:

So this approach will still require a lot of manual work.

Does this work?


Mathias you grasshopper genius, you’ve done it again! Works like a charm :ok_hand: I’ve literally spent so many hours trying to figure this one out. Put seeing the level of grasshopper magic you’ve put into these components, I’m not feeling ashamed at all :wink: Thanks for the help

1 Like