Purge/Delete unused elements

Hi Rijsmus,
What package is that?

It’s not a package, it’s what they call a dynamic link library or dll.
Go to File, there is a command import library.
I don’t know if it will work.
It’s a bit too simple i think, to just expect it will work.
It might damage your Revit file, who knows

2 Likes

@Marcel_Rijsmus can you show me the graph how this works? for purged unused ?

I have not tried it

btw.
its a one click operation in revit, why automate it?

Maybe this could work

http://www.mouserecorder.com/

@Marcel_Rijsmus
i have to purge unused until it becomes 0 purge items.

It is 4-5 time repeated process.
if you could help with some script that would be helpful .

@Brendan_Cassidy
Any Python script for Purged unused?

The same question was asked yesterday :

@Alban_de_Chasteigner
This is superb but how to make until it becomes 0 (Zero) purged items.

Thanks in advance.

Hi @shrawanram and @Alban_de_Chasteigner ,
I am also having this doubt, have any of you been able to run the script until the purged items are 0?

Thanks,
Clara

Hi Clara,

In Dynamo, you can reproduce the Revit function Purge unused.
But it will be exactly like in Revit, you have to repeat the command 3 times.

Hi Alban, I used the python script and got that to execute the revit command “Purge Unused” , but it will only do it once no matter how many times it appears in the Dynamo graph. How can I get it to repeat the command 3 times ?

Hi Philipp,

It’s not possible to repeat the postable command.

See also this post :

There are other ways than using postable commands… try the purge node in the Orchid package

4 Likes

Can you share with us the code behind the node Document.Purge? I am curious which method is used to achieve that.
Thank you!

He leveraged a portable command last I knew. Best to ask in the github for the orchid project as he isn’t active here anymore.

1 Like

@oliver.green translated this code snippet from VB to IronPython :

The iron python script :

2 Likes

Thank you very much!
Cheers!

Ummm … guys … I can’t find anyone who’s posted this here yet but:
Model Cleanup - Deleting Views
About Aug 2017, @Andy_Grout posted regarding a model cleanup complete with choices running in the Dynamo Player.
I’ve also created & use this Purge All graph: Purge%20All%20graph
This graph uses the Orchid package 202.4.2 or newer. Developed in Dynamo 2.0.

[edit] Missed listing @erfajo 's post, it is another example of purging. His post is for purging excess files from a directory though (ie: RevitFile.0001.rfa). I’m still learning.

Hope this helps.

There is a Youtube Video to purge unused

Dynamo - Purge Unused

Hey guys I found this on twitter by someone named Bird Tools. I don’t know much about this command, but I tried it in Dynamo and it works but it takes a while to process.