Reading Sub-Categories on Families

I’m just building a simple script to quarry a project and dump all of the parameter data from the families available into excel. Using Element.Parameters I can get pretty far, but it doesn’t list Sub-Categories of the families. Clockwork Node Geometry+ only lists 1 specific family, where I’m looking at bulk info on everything in a project.

The place I’m stuck is reading the sub-category off the families themselves. I can’t seem to find anything that reads the information.
I tried Clockworks “Category.Subcategories” but it just reads from the project, not the family. (Circled below)
(Odd how they’re Object Styles in the Family Editor, but Sub-Categories to Revit.)

Hi @JPParker,

You can use the Family Get Subcategory node in Genius Loci package.
(It doesn’t work with In-Places families)

2 Likes

Thank you! Took me a minute to get back and give it a try, thank you very much!

As I’m digging into this further, it’s pulling some odd data I’m not expecting. I have 1 family in the selection set that contains 2 instances of a family. I’m trying to read the nested Object Style on the family to provide it to a list of parameters I want to export to EXCEL. The family I used contains 2 object styles JASONOBJECT & HIDDEN LINES The list contains 44 object sub-categories. The others listed from the family are in the Project, but not associated to the family all. (DOORS, ELEVATION SWING are on a different piece of casework, like it’s reading from the project instead of the object?

Hi Jason,

Can you show the entire graph so that I understand exactly what is going on and drop a Revit sample file with the relevant families ?

_iTEM QUARRY.dyn (43.0 KB)

Attached is the script. It’s a WIP obviously by the mess.

Hi Jason,

I tried your graph and the result seems perfectly normal :
If you collect all the subcategories in all the families of the given category, you will get duplicate subcategories.

If your goal is to export the subcategories of one family to excel, you must start by selecting the family.

Yeah, that’s exactly the route I was going. I want to be able to dump all of the families in a project to excel, wanted to get the Object Styles that were part of each family. I need to look at about 250 families all from different sources and locate and correct the parameter differences. Figured this was a good start, see what I have first.