Purge Unused Families

I can’t seem to find guidance on purging un-used families from Revit, this is what I have so far. First group are all the families in question, the second group shows the element in use which I don’t want to get rid of. I want to essentially get rid of all the families within the first list that are not in use.

Many thanks!

Here is an example of deleting unused Types of the Railing System Family.


R8-RiR-RailingTypes.gh (13.3 KB)

It appears you have created faux Families.

Can you provide a small example file?

That’s right, it’s a dummy rail just so it’s categorised under Railings when scheduling/controlling visibility and whatnot.

Here’s a sample file
Railing Sample.rvt (1.6 MB)

Many thanks!

The script you attached works in deleting the family types but is it possible to make it delete the families instead?

Before running the script

After running the script

The issue here is accessing the Family or Family Symbol.

The python script will quickly get you the Types Family Symbol, or you can use the Family Class filter..

R8-RiR-RailingTypes-V2.gh (19.0 KB)

That’s perfect! Thanks a lot Japhy :slight_smile:

1 Like