Purge unused in project

Hi all,

I want purge using the command purge unsed which is present in manage tab. But along with that I want purge unused [views, view templetes, lines/linestyles, filled regions, sheets, elements, filters… etc] all purgeable objects present in the project and want to know the names of purged items as output. Do I have any solution ?

I am trying with genius loci package node “purge unused” with deeply but I want purge unused sheets, unused items which are purgeable in the project.

Hi @shashank.baganeACM

You can use the purge command in Dynamo (via Python), but this will not Purge views, view templetes, lines/linestyles, filled regions, sheets, elements, filters.

You have to write something yourself for most of these elements.

Purging always requires a condition. if this condition is true, the object will be purged.

How would you like to purge sheets? If there are not views on the sheets, they can be purged?

Purge View Filter is easy btw:


Try using the set difference node too, makes it even easier. All filters for input one, used filters for input 2. The output is all unused filters.


yeah definitely @GavinCrump got your point.

Yes thank you so much @Joelmick it helps for me. Actually I was also doing the same by getting the views which are not present on sheets and sheets which don’t contain any of the views.

Will post the final script once I am done.

Yeah, but I always do it this way so I can see which filters are used and which aren’t. I display the names via the Dynamo player so users can see what they are and aren’t purge.

Your solution is less nodes though.
…Something with Roads and Rome… :joy:

1 Like

Yeah great let me know. I am currently developing an Addin for myself with a Purge function. I am curiious what else I can purge, so far I have:
And Unused Parameters in Families (Not yet added to the ribbon, but works great)

Oo purge worksets… how does that work? Last I checked workset deletion wasn’t in the API but would love to know I’m wrong.

It checks if a workset in empty, It asks the user if he wants to delete the worksets. If so, It renames the workset so they and up at the top of your workset list and it opens the Workset editor. The user can then delete them by hand.


It automates the whole process of finding out which worksets are empty. So it does not delete them for you, but it makes the process a lot easier.

2 days after I made this tool the Revit API 2023 came out and in there you can remove worksets. So now the tool check the Revit version and if the Revit version is 2023, it will also delete the workset for you.


Very nice, thanks for sharing the logic! I use a similar human assisted method with pyrevit currently but didnt know about 2023’s new API, cool!

Also, badass addin name.

Whaha thanks, trying to stick with the Beyond-(Software name) BeyondRevit and BeyondDynamo, but for this part of the addin (Hades) I got my inspiration from Horizon Zero Dawn :grin:


Hi @shashank.baganeACM,

To delete views not placed on sheet, see this post :

Among the addins I developed, I also have a purge button.
I can delete view templates,unused view filters, views not placed, imported DWG, unused scope boxes, unused parameters, unplaced spaces, unplaced rooms, imported line styles and imports in Families object styles.


Looks like we’re all putting out the same fires, nice tools! Digging the videogame name inspirations too.



I’m interested in the purge unused parameters.
Is it a Dynamoscript behind that one? If so, would you mind sharing that one? Wold be much appreciated!


Hi Livio,

This is a proprietary addin coded in C# language.
However there is a similar Python version on the forum :


Purge unplaced views does it clear schedules ,legends and views not placed on sheet or?
have one more you probeably can add Purge Links.