Delete a workset

Is it possible to delete a workset? I’m a bit stumped by it.

Part of a the workflow I’m doing is:

  1. Delete worksets with prefix “+Links_”
  2. Create new worksets from rvt link names with prefix ("+Links_"
  3. set link instance & type worksets to a workset with their file name in it.

Step 2 & 3 is working fine, but can’t get step one down at all, and end up deleting manually every time.

2017-07-24_Worksets-Delete-Links.dyn (10.7 KB)

Generally it is recommended to show your image graph as part of your query as this will speed up things. Others in this forum are experience on the kind of issues so by just looking at the graph they can tell you the solution. Having the dyn is a plus but someone need to download it and open in a pc for us to be able to help. Like me for example i want to help but i am not in a computer, so by seing the graph i may solve your query. Can you post your image graph. Tnx…

I looked at this a few months ago. I know that you can create a workset, but I don’t believe you can delete one. Unless I"m mistaken, I don’t think the API has a method to do this yet.

Try the tool.eraser node which I think is in spring nodes. I haven’t seen much it won’t delete. Feed in the workset element and see what happens. Be sure you’re detached and insulated from tea member’s efforts as it may cause stability issues.

1 Like

It’s worth trying that node.

The issue is that in the API worksets are identified by a Workset Id as opposed to the typical Element ID. I was never able to find a deletion method that accepts a WorksetId.

Just tested myself - fails. I’ll see if I can think of any other methods up while I sleep but I think you may be right in that it may not be possible to automate.

Thats a shame, at least i know it’s not just me!

Having the same issue. Tool.Eraser did not work for me even though the Worksets are set to Editable

Hi there,

See here:
https://forum.dynamobim.com/t/how-to-select-empty-worksets-and-delete-them/19329/10

You can’t delete a workset using Dynamo.

cheers

See also the thread at the Revit Forum below

Unfortunately, Revit API does not provide this functionality yet.

1 Like

Hello

Has there been any update on this??
i have even tried the GeniusLoci node “DeleteWorkset”, it gives me “null”

Hi,

Are you in the correct version of Revit to use the custom node?
Is the type of workset you are trying to delete : UserWorkset?