Clear list on Document.Close

I’m working on something that can look at the nested families within a family, then load based on that list. The issue I’m running into is clearing the Family.Name Orchid node once the family has been saved/closed and moves onto the next family in the directory. Is there a simple way to do this?

I’m still pretty fresh with Dynamo. Thank you for the help!

Can you try explaining that again more clearly? It sounds like you’re wanting the family names to come up only until they’ve been loaded back into the original document and closed. That’s not the way Dynamo works. Even though each node has to execute individually, the graph as a whole only executes once. Each family document is essentially being handled at the same time. There is no “moving on to the next family”.

Thanks for clarifying, I was thinking it was running through the families one by one. If that’s not the case I don’t think this is going to work.

Essentially we have door families with various frames and panels loaded into each based on the type of door. So I was trying to come up with a way to check which frame/panels are nested and use that list as a filter to only load what is needed.

It works great on single families, which is still way quicker than manually reloading the nested families at least.

Let me know if that clarifies what I’m going for.

I’m still not quite following the exact process. It might still be possible through a single python script but will likely require some extra effort to make sure things are processing in a specific order and only when necessary.

Lets say I have door1 and door2. Door1 has frames F1, F2, F4 and Door2 has F2, F3. I only want to update those specific nested families from the frame folder which has F1 - F4. I do not want to load in all frames into all doors.

I’m sure it would be easy to handle with the python script, I just need to brush up on that.

There’s probably a way to create a separate list of nested families for each door that opens and use those as a reference. I just probably can’t accomplish this with the Orchid nodes.

That should be no problem. I think the issue is that you’re flattening your list of family names. This is causing you to find the intersection between all doors instead of each door individually. I think you just need to handle your lists a little better. Try using list levels to give you an intersection of matching frames for each door.

I got it to work! Like you said, I just needed to add some list levels and it carried that data through. Thank you for the help.