I know this is a recurring topic, but the API is an absolute mess in terms of families, types, system family, symbols, elements…
I am collecting all types in the project (I don’t care about instances actually used in the model), and so I am using the ElementType classes, and I can get their family names.
However, how do I get the Family elements themselves?
This is a general revit thing vs the API.
Walls are system families so do not derive from a family element in the way a loadable family does. They belong to the WallType class, and inherit the ElementType and Element classes.
Loadable families are different, and are of the Family class. Their types are of the FamilySymbol class who provides access to their family via the Family property.
Thank you Gavin.
You can see in my screen-shot that there is a “Family Name” parameter, for the ElementType elements. This name is different from the ElementType name (which I can also find).
If there is a “Family Name” string, there need to be some element, that has that name, I would assume?
Just like the ElementTypes that you see in the first node with the green box element ID in them.
Maybe I am going the wrong way about this…
Regards
I dont think that family exists as an element. The same way basic ceiling, basic roof, gutter etc dont but their types fo (ceilingtype, rooftype, guttertype etc).
System families are handled differently in the revitapi to loadable families. Family exists only as a string property in the case of system families.
Even if basic wall could be obtained as an element it wouldnt be useful i think due to how system types are implemented in their own classes, whereas loadable families feature families and familysymbols belonging to them.
2 Likes
It does, but I don’t believe you can’t touch it without corrupting things. It must exist for the class structure, but it must not be workable due to the way walls work (similar to built in categories).
1 Like