Getting Element Geometry Materials

Is there a way to get the material of each piece of geometry from revit?

I tried this python component but it doesn’t seem to be working:


It depends on how the Elements Materials are assigned. If in this window for instance the Subcategories were controlling the material these would line up.

The Element Preview skips all the subcat/param and combines geometry and materials into what you see is what you get.

Ah ok, so there is no way to data match the materials with the geometry? I’m looking at windows and trying to isolate the glass, and the subcategories don’t match up in some cases. I thought looking at the materials would be more consistent.

I’d like to bump this post. Basic matching of the outputs of the Element.Geometry node to their corresponding materials would be super helpful.