Purge Workset

Hi all, I wonder if there is a way using to do something like “PURGE” in Revit that it can automatically check if all the worksets are empty, and if it is empty, delete the empty worksets automatically?
I know when you try to delete a workset in Revit, if there is some elements in there it would ask you if you want to move the elements to other workset. But I don’t want to do it one by one workset. It would be great to just do it in one go.

Hi Jack,

Something like this?

Thanks Japhy, it works perfectly!!
But only one concern – I realize that if you use Delete Workset to delete the non-empty worksets, it won’t ask you if you want to move the elements to another workset as the Revit delete workset command does… Which seems a bit dangerous to me…

I have a further query: Is that possible to unhide and select the elements within a workset by using RIR?
Now that I found my empty Revit template model has quite a few worksets have elements in it. I want to quickly check what are those elements. Then decide if I should delete them. But now they are all hidden in the model…

Hi Jack, here’s a thread to get you started..

Thanks Japhy~