Journal Script to Purge Unused in Revit Families

From Revit Randoms

  1. Download the files here: Upgrade_PurgeUnused.zip
  2. Extract to a folder of families you want to purge.
  3. Copy the first family in your category and paste and rename it in the same folder.
  4. Edit the ‘Upgrade_PurgeUnused.txt’ file.
  5. Insert the file path of your ‘dummy’ family file.(update all 3 file paths)
  6. Save and close.
  7. Run the upgrade.rfa script.
  8. Drag the ‘Upgrade_PurgeUnused.txt’ file onto your Revit icon. (make sure Revit is closed first.)
  9. Watch in amazement as Revit opens and purges your families.
  10. 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

1
Leave a Reply

avatar
1 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
0 Comment authors
Jan Usinger Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Jan Usinger
Guest
Jan Usinger

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.