Can be get list Nest family of Family is not yet place on model

Hi all!

I try get all Nest family of Family in project.

If family has place on project (Family Instance) can be use menthod
“GetSubComponentIds”, but family not is Instance seem like have’nt menthod to get it.

I can get all family of category in project follow this:

def all_elements_of_category(category):
return FilteredElementCollector(doc).OfCategory(category).WhereElementIsNotElementType().ToElements()

#get Furniture:
Furniture = all_elements_of_category(BuiltInCategory.OST_Furniture)

all_Family = FilteredElementCollector(doc).OfClass(Family).ToElements()

for i in all_Family:
print(i.Name)

Thank Advance!

image

Hi,

Perhaps these posts are useful to you? :slight_smile:

Also if you use the </> button you can paste your code formatted :slight_smile:

Hope that helps,

Mark

3 Likes

@manhgt214 ,

This topic can help you too :slight_smile:
ʳʰʸᵗʰᵐ|FamilyInstances.RetrieveNestedComponents vs GetSubComponent - Revit - Dynamo (dynamobim.com)

1 Like