Writing a purge utility

Writing a purge utility

JoelBradley
Contributor Contributor
1,775 Views
2 Replies
Message 1 of 3

Writing a purge utility

JoelBradley
Contributor
Contributor

I'm a developer, but for the last year or two have been learning and using Revit instead.  I haven't yet delved into coding in Revit.

 

I am wondering if anyone can give me any idea of how involved it would be (and whether it's even possible) to write a utility that automatically purges Revit files.  Specifically, I would love to be able to schedule a batch file to run overnight that invokes such a utlity to open, purge, and then re-save files (e.g. - purge.exe MyProject.rvt); or, if that's not possible, maybe even something that can run from within a Revit application session and do the same thing at a scheduled time for multiple files in a given folder.

 

I don't mind figuring it out for myself, but would appreciate any insight anyone can give me on feasibility (and even suggestions on direction) before I try tackling it.

 

Can anyone shed some light?

 

Thanks!

 

Joel

 

0 Likes
Accepted solutions (1)
1,776 Views
2 Replies
Replies (2)
Message 2 of 3

phildebrandt
Enthusiast
Enthusiast
Accepted solution

Opening and saving files is no problem. I don't think you can invoke the purge command from within a customn app. You would probably have to write some routines that would check for instances of each family type before removing them from the file. I think this is also do-able.

Message 3 of 3

JoelBradley
Contributor
Contributor

Belated response (!!) --- thanks for your help, phildebrandt

0 Likes