Get unused filters

Within Revit, there are certain elements which cannot be easily purged. For example, the out-of-the-box ‘Purge Unused’ command (Manage > Settings > Purged Unused) is unable to delete filters, view templates or line styles. Even with the aid of Ideate Explorer we are unable to select them and therefore, unable to delete them.


While it’s possible to delete these items manually, this isn’t always a straight forward process. When deleting filters, Revit will indiscriminately delete the filter without forewarning you that the filter is currently in use. This means that there is no way to differentiate between those filters are in use and those which aren’t.


When deleting view templates, Revit will at least warn you that the view template it is in use and give you the option to choose a replacement view template. But this is a very labour intensive task to go through each view template, one-by-one, see if it is in use, and if not, delete.

Dynamo_DeleteViewTemplate 1600x600

To help solve this problem, BVN has published a custom node as part of the BVN Dynamo Packages. The ‘Filter.GetUnused’ custom node collects all the unused filters in the project so that it can be used in conjunction with either the ‘Tool.Eraser’ node from the SteamNodes Dynamo package or the ‘Delete Elements’ node from the Grimshaw Dynamo package.


13 Comments on “Get unused filters

  1. Top work chaps!

    We had a big issue with one model, ran the script, deleted 4485 unused in 5 seconds.

    Thank you!

    • Thanks for the feedback Pete. I’m glad it solved your issues. We’ll soon be developing solutions for the other culprits, like unused view templates, so stay tuned.

  2. Thank you for the guide, it works just fine! It is a bit scary though that I don’t know what it deletes in my project. I have been trying to add a “Watch” to list all the deleted filters, but don’t seen to get it right. Do you have any suggestions?

    • Hi Antonio. I don’t know why the Watch node wouldn’t be working for you. Have you tried the preview icon on the actual node itself? Does anything appear in there? I can look into modifying the node so that it returns the elements (ID) AND the filter names so its a bit easier to know what is about to get deleted.

      • Thank you for the input! It seems that I have been víewing my problem from the wrong perspective. I was trying to “Watch” what Tool.Eraser deletes, when I can indeed “Watch” which filters Filter.GetUnused returns. So in other words I can identify what the definition deletes from my project.

        View the link below to see my definition:

        I would however be happy If you have a way to “Watch” what Tool.Eraser actually delete.

      • But I would be very happy if you could modify the node so that it returns the filter names! 🙂

    • Thank you! I sent a message to Julien, lets see if he is up to updating his node… 🙂

      • Paul,

        i’ve just upgraded to Dynamo 1.0 and its works.
        Looks like with 0.9 nothing happen after applying the Tool.Eraser.

        Thi is much simple than my previous nodes ! thank you!


Leave a Reply