How to get, per geometry in Family, its corresponding SubCategory and/or Object Styles?

Hi all,

I’m currently working on a “Health Check” script for which I need to verify if the Geometry, within our Revit Families, correlates to the correct subcategory/Object Style. I would like to run this script from the project environment.

I have been able to retrieve the categories and subcategories for each Revit Family, using Family SubCategory from the GeniusLoci package. However, as far as I’ve been able to get, this is a dead end since through this approach am I not able to check the specific geometries within each Family, I just get the subcategories us.

So my question is, does anyone know how to retrieve/view, per geometry in each Family, what its corresponding SubCategory and/or Object Styles are?

Think you will have to go into the family document and check each form element for it’s subcategory rather than working in the project environment… :grimacing:

I see, that’s an answer too.
Is there no way at all to view the subcategories of geometry within Families from the Revit Project?
Or even a way to just retrieve all the separate geometries per family (besides element.geometry, something including some information)?

Well, I am seeing that there is a ‘GetGraphicStyleId’ of geometry element objects, which per the example may return what you’re after: https://www.revitapidocs.com/2024/4103f148-957e-3f44-9ccd-a5ed6702c689.htm

Note that you might want to set up a 3D view which sees each geometry object at each scale as a first step in your process to ensure you’re catching fine/medium/course geometry correctly.

You can use BriMohareb_xxxx pak node Get_Geo_Subcategory
@Daan

1 Like

Hi @RMohareb ,

I tried your package and node but I couldnt get it to work, could you show me an example of how to use it?

@Daan

here you select the family element from the project and input the subcategory, you get all element inside the family have the input subcategory

1 Like

Is this from the project environment or from the family environment?

@Daan
project env.

1 Like

Got it! Thanks!

Hi @RMohareb ,

Do you perhaps know if its also possible to know if geometry in a family is not tied to any subcategory/ object style?

Try use lookup node in the same pakege @Daan

1 Like

I will, thanks

1 Like