This tutorial will present how to create worksets and rename the default worksets using Dynamo. Note that before you create worksets, you will need to enable worksharing. If you want to understand the benefits of worksharing, check out this tutorial first.
Enabling worksharing
Revit 2016 or earlier
To enable worksharing in Revit 2016 or earlier, click on the ‘Worksets’ button in the bottom ribbon. Alternatively, go to Collaborate > Manage Collaboration > Worksets.
Revit 2017 –
From Revit 2017 onwards, it is no longer possible to activate worksharing via the Workset button. It is only possible via the Collaborate > Manage Collaboration > Worksets.
Once pressed, you will be asked how you want to collaborate: Collaborate within your network; or, Collaborate using the cloud.
Default worksets
Once worksharing has been enabled, Revit will create default worksets and assigns elements and settings to these worksets. The default worksets are as follows:
- ‘Shared Levels and Grids’ – Contains all existing levels, grids and reference planes. Note that if you choose to collaborate using the cloud via BIM360, the workset will be named ‘Shared Views, Levels and Grids’.
- ‘Workset1’ – Contains all existing model elements in the project. Once created, this workset can be renamed, but it cannot be deleted.
Dynamo automation
If you have an office naming standard for worksets, we can automate the creation of them. For example:
- 00_FACADE
- 10_STRUCTURE
- 20_VERTICAL CIRCULATION
- 30_INTERIOR
- 40_FF&E
- 50_SITE
- 60_MASSING
- 99_LEVELS & GRIDS
- Etc.
The script utilises the Parametric Monkey Dynamo Package node ‘Workset.CreateAndRenameDefault‘ to add the new worksets and rename the existing default worksets.
As you might have noticed, we’ve decided to do something a little tricky with the default worksets. Since ‘Workset1′ cannot be deleted, we figured it was best to rename this workset to something which we would always have in every project. That is, it would never be deleted. We concluded that the most logical workset was actually ’99_LEVELS & GRIDS’. Therefore, as shown in the screenshot, the ‘Shared levels and grids’ is renamed to ’60_MASSING’ (or whatever will be your most dominate workset), and ‘Workset1′ is renamed to ’99_LEVELS & GRIDS’. If you don’t want to follow this protocol, reverse the inputs. Once the script has run, you should see something like this in the workset window.
21 Comments
Bart Jeurissen
Great tool, however my “Shared Levels and Grids” and “Workset 1” aren’t renamed when I run the script.
However the new Worksets are created.
Bart Jeurissen
Sorry, I was to fast.
It does work.
Thankx for your great work…
John Raiten
I have the same comment as above, it seems the script inside the dyf is not working.
John Raiten
I looked at the code and pulled it out and tried it manually and this is the errors I get.
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 28, in
NameError: name ‘workset’ is not defined
Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “”, line 26, in
AttributeError: ‘str’ object has no attribute ‘Id’
paulwintour
Can post what version of Revit, Dynamo and the package you are using. The graph would also be useful.
Tyler Chalstrom (@HeyItsChally)
FYI, I had success splitting the renaming Code Block into two separate Code Block nodes.
John Raiten
And you were able to get Workset 1 and Shared Levels and Grids to rename?
Craig Johnson
Same here, Revit 2018.3 Dynamo 1.3.4 same graph as above.
Chris
As others have stated, the renaming doesn’t work.
paulwintour
I’ve tested the node with Revit 2018 and Dynamo 1.3, as well as Revit 2020 and Dynamo 2.1 and it works for me. A few things to check that might be causing issues:
– Have you already enabled worksharing (it won’t work unless this has been enabled)
– Are you sure you have the latest version of the Dynamo Package and its dependencies?
– Is you project file in English? The node is looking for default worksets names ‘Workset1’ and ‘Share levels and Grids’. If you are using another language, this might be different.
– Are you running in Manual mode (this is preferred)?
Chris
I finally got it to work. I did not have the latest and greatest packages. Works like a charm now. I now need to spread it out to my co-workers computers so it will work for them too. I actually found my issue shortly after posting.
Jaysyn Quarry
Well, what was your solution? =)
paulwintour
By making sure you have the latest packages installed
KD
I have the latest Package installed (1.6.1) and it is still not renaming them.
paulwintour
Can post what version of Revit, Dynamo and the package you are using. An image of the graph would also be useful.
SteveG
Need some help…. this was a great script till I got into revit 2019 w/ dynamo 2.0.3. Now more often that not, I get an unresolved/ note cannot be resolved message over the Archi-Lab nodes within the custom node.
Sorry in advance, I really new at using Dynamo.
paulwintour
Hi Steve. The package has only been tested with Revit 2018 and Dynamo 1.3. Dynamo 2 has substantial changes.
Adam
I have tried to install 1.3.6 version from Dynamo 2.x but it require achi-lab.net to uninstall but I wanted to keep archi-lab.net. Is there a solution as I am only looking for worksets rename.
Paul Wintour
Hi Adam.
I haven’t tested the node with Dynamo 2.X so it may not be working.
But to answer your question, the uninstall is a Dynamo ‘bug’. The Parametric Monkey Dynamo package has dependencies including archi-lab. Dynamo doesn’t like that it is already installed and tries to uninstall it before re-installing! Apparently this functionality is fixed in the later version Dynamo 2.6. However, you have two options:
1. Uninstall archi-lab and then install the Parametric Monkey package. Or
2. Don’t use the in-built package manager. Go to the Dynamo Package Manager website, download the package and then place in the library folder.
I hope that helps
Invzibl
Paul, has your package been replaced by something that works in Dynamo 2.x then? I really miss the workset rename and creation script and would like to use it in Revit 2019 and beyond with Dynamo2.X+.
I have the latest package installed 1.3.6 and it doesn’t do anything. No errors either.
Any help would be greatly appreciated.
Invzibl
Paul, after a quick look at your workset.CreateandRename node it appears it has an issue with the archi-lab package i have installed. Maybe you knew this already. If so I apologize.
FYI