I want to ask if anyone have a dynamo script that can delete the empty worksets from the model
I did the same for selecting empty worksets. Then I tried to delete those ones, but I could’t do it.
Dont know if the thing is that we can’t delete worksets or maybe I didn’t use the properly node.
It seems Worksets are not Revit elements. I have not looked in to this, but I believe that is the reason why the element deletion nodes does not work.
Work sets are elements, but their class doesn’t have a delete method in the api to keep people from deleting stuff they actually need but think they don’t. This would be a GREAT way to corrupt a model otherwise.
Send the list to an excel excel and open the work set manager. That interface has built in protections to keep you from getting too aggressive.
Hi guys sorry for not answering but I was in vacation and thank you all for your support.
There is an easy node for getting the empty workset from Bakery
@JacobSmall Worksets are not Revit Elements in the sense that they are not
Element class objects. That means they don’t have any of the properties of the
Element class objects and cannot be deleted with the same methods.
I always refer to Inheritance structure in the Revit API to determine what is what. Workset’s inheritance tree doesn’t have
Element in it so it’s not an
Element in my book.
Unlike something like a
Wall which inherits from
Element so it’s an Element:
@andre.abotnes With that being said, there is actually no method in the API that allows you to delete a Workset. *as far as I am aware Dynamo won’t help here.
This question has now been answered. The answer is no you cannot delete a workset using Dynamo. That exception though is something you should report here: https://github.com/DynamoDS/Dynamo/issues