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 filters, without forewarning you that the filter is currently in use. This limitation means that there is no way to differentiate between those filters are in use and those who aren’t.


When deleting view templates, Revit will at least warn you that the view template 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 Package. 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.


22 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!


  3. Boolean > Filter.GetUnused gets the list of unused filters right away. However, Delete Element is no longer in the package (at least not like the script), and just toggling the initial Boolean to False initiates a DELETE of all the unused filters without review. Would like the option to report on it, then make a decision to delete. Revit 2018.2

    • Hi Michael. The Filter.GetUnused node doesn’t delete any filters, even if using Revit 2018.2. As documented, the ‘Tool.Eraser’ node is from the SteamNodes Dynamo package and the ‘Delete Elements’ node is from the Grimshaw Archi-lab Dynamo package. In the latest version of archi-lab (2018.0.8) it is in there. It is only once you connect these up that they will be deleted. If you want to review before deleting don’t connect it until you review the Filter.GetUnused output.

  4. hi.i am having troubles finding the Filter.GetUnused node. I’ve downloaded BVN but can’t find it.
    great post, thanks.

  5. Which version of the BVN package are you using? It should be there. You can search for it in the top left of the library. Alternatively it is filed under BVN > Selection > Filter.GetUnused.

  6. Paul Hello ,

    I’m trying to install latest version of BVN but it is deleting almost all of the other custom packages ? Is there any solution for this ?

    • Hi Ovunc. Yes this is a problem with how the Package Manager works. What you need to do if installing via the package manager is to search for BVN and install. It will say that some packages need to be uninstalled first. They will be marked for removal. You need to close Dynamo and Revit to fully uninstall them. Then you must reopen Revit and Dynamo and try to install BVN again. This will automatically install the dependency packages including Archi-lab, Lunchbox, Clockwork, etc. Let me know if you are still having problems.

  7. Hello;

    Is there a version for Revit 2016?


    • Hi John. I’ll be doing a 2.0 release probably in about a month or so. Lots of nodes to test and update!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.