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.

Dynamo_PurgeUnused_1600x600

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.

Dynamo_DeleteFilter_1600x600

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.

Dynamo_FilterGetUnused_1600x600

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!

    Like

    • 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.

      Like

  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?

    Like

    • 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.

      Like

      • 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.

        Like

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

        Like

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

      Like

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

        y

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: