Nested familys in familydocument

Hi all,

Is there a way to get the nested family’s from a familydocument?
I use the Crumple package to open the family’s in the background.

Hi Jan…here is a way with orchid if it is what you mean;)

3 Likes

or a bit of python

def nested_fam_name(doc_fam):
    doc_family = doc_fam.Document.EditFamily(doc_fam)
    print (doc_family.Title)

for i in families:
    nested_fam_name(i)
3 Likes

Thank you for sharing this, is there a way to get the nested-nested familys by using a python code?
I have nested familys with nested familys inside.

Btw, I have an error:
image

I’m not a pyton user yet.

If you return the families as objects you could probably chain these nodes, but not sure if it works in a while loop (can’t see why it wouldn’t).

Thank Gavin, I thought the same.
This is my end goal, I want to collect my nested family and set in all those documents the parameters.

Any thoughts?

Probably not easily done without some advanced Python given you’re dealing with statements of variable depth (it would have to either be a while loop and/or a yielding function to my understanding).

As families are opened, they would need to be told their containing family for reload, and the same Python block would ideally add parameters and track the level of depth they sit at.

A simple for loop could then iterate across the levels of nesting in deepest first, then reload back in later iterations. The family to be reloaded to would need to be available, so tracking the depth of nested families is key.

Dont have enough time to try building it unfortunately (conference this week) but hopefully someone else has time in the meantime. I’ll look into it later hopefully.

If you’re getting to these types of workflows it may be time to begin learning Python.

I’m going on a python course next week :slight_smile:
I think i have to take an other route for this script, maybe later with python.

Thank you all guys :slight_smile:

1 Like

This would be a good application if those skills you learn in the Python course, and I am sure the larger community would help you should you get stuck. :slight_smile:

2 Likes

Yes for sure! Then I can immediately see if I can get the for and while loop under control :slight_smile:

1 Like

I think you could only use a definition and a while loop, by leveraging List.Pop to cycle over the collection of families until the list is empty, appending newly found families back onto the list as needed. :slight_smile:

Thanks for the tip @JacobSmall :slight_smile:

1 Like