Purge all families and its nested families using dynamo

Hello,

I am new to dynamo, and I want to purge all families then purge all the nested families then reload it in the project using dynamo.
can you help me how to begin with these steps?

Hi @alyaa.ahmedA6RV5 , Welcome to the forum.

Try to use this node.

Let me know your responses.

1 Like

I tried as shown, however it gives me a null output when I RUN.
is there something wrong in this sequence?

Also, I want to ask how to select all the families at the same time as I tried it on only one by its name.

99% likelihood that you don’t have the right version if IronPython installed Open the custom node and see if you get a warning about a missing engine; adjust your environment if so.

it will not return document as output. do you want to purge purge the family files ?

in the above photo I tried to select all families using python script, and it worked.
But I have two problems regarding the remaining sequence.

1- I think the reload node is in the wrong position, I want it to be the last node to run,
accordingly, what node should I use after Purge unused node to connect the reload node with it?

2- I want to add a node to purge all the nested families as well, as deeply purge in this script has no impact on the nested, it only purged the families itself.

Into your passthrough, just put in a “True” Boolean and this will run the other purge unused nodes.

Other option is to try and adapt the following code to work with other documents(including families)
dynamoPython/revitAPI/PurgeUnused.py at master · Amoursol/dynamoPython