From Revit Randoms –
- Download the files here: Upgrade_PurgeUnused.zip
- Extract to a folder of families you want to purge.
- Copy the first family in your category and paste and rename it in the same folder.
- Edit the ‘Upgrade_PurgeUnused.txt’ file.
- Insert the file path of your ‘dummy’ family file.(update all 3 file paths)
- Save and close.
- Run the upgrade.rfa script.
- Drag the ‘Upgrade_PurgeUnused.txt’ file onto your Revit icon. (make sure Revit is closed first.)
- Watch in amazement as Revit opens and purges your families.
- Go make coffee.
Now this can be used on any category of family, but you will need to make a dummy family that can be loaded into each category, else it will not work.
Read more at:
http://revitrandoms.blogspot.com.au/2013/08/purge-unused-in-families.html
In the post, he also references some journal scripts by Aaron Maller that use the old File Upgrader to Transfer Project Standards from a project to families. The benefits of the old Upgrader are shown at: http://cadalot-revitlearningcurve.blogspot.com.au/2011/06/file-upgrader-for-revit-vs-content.html
Heads-up
Revit Script – Purge Unused in Families http://t.co/AydWpteaUK via @darrylstore
— Ben Malone (@BenPMalone) August 5, 2013
I discover two issues:
(1) the "xxDummy.rfa" needs to be a 2D annotation family so it can be copied into other annotation families.
(2) Some saved family files turned out to be larger (10-30%) than my original files.
To optimized the file size, repeat the following lines in your script another 2 times:
Jrn.Command "Internal" , " , ID_REVIT_SAVE_AS_FAMILY"
Jrn.Data "File Name" , "IDOK", namepath
This does a triple save which acts like a compacted save.