# Set "Workset" Parameter from Instance/Type Parameter?

**URL:** <https://forum.dynamobim.com/t/set-workset-parameter-from-instance-type-parameter/28750>\
**Category:** Uncategorized\
**Created:** [November 21, 2018, 10:55am UTC](https://forum.dynamobim.com/t/set-workset-parameter-from-instance-type-parameter/28750 "2018-11-21T10:55:47Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![c99417952](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@c99417952](https://forum.dynamobim.com/u/c99417952)\
**Post date:** [November 21, 2018, 10:55am UTC](https://forum.dynamobim.com/t/set-workset-parameter-from-instance-type-parameter/28750/1 "2018-11-21T10:55:47Z")

</div>

Hi All,  
I understand how we can “Get and Set Parameters by Name”……but can we “Get” an instance parameter and “Set” the Worksets Parameter in the Properties box?. My thinking is to properly clean up my family library and within each family create a parameter (e.g. Family workset) and populate it to read what workset this family should be on (e.g. 44 – SRV Fire).

![Family%20Types](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/0/f/0f2d52f5d6ea783021310fb5aef91741c8b030b8.jpeg)

Then load it (and all other relevant families) into a project and use a dynamo script to Get the information from “Family Workset” parameter created in the Family Mode, and populate all that information into the workset parameter which will correspond with the Worksets all ready available.

![Family%20Workset](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/1/a/1ae03e5813c9af3d3050d62352d90f11f5b3a962.jpeg)

Basically I want all my families to be on the correct workset for visibility purposes. Some families have the same “categories” but might be required to be turned on or off in separate views. Thanks for your help.

---

<div class="post-metadata">

**Author:** ![m.rijsmus](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@m.rijsmus](https://forum.dynamobim.com/u/m.rijsmus)\
**Post date:** [November 21, 2018, 11:14am UTC](https://forum.dynamobim.com/t/set-workset-parameter-from-instance-type-parameter/28750/2 "2018-11-21T11:14:05Z")

</div>

> **[FAQ: What are the different types of worksets? | Revit Products 2016 | Autodesk...](https://knowledge.autodesk.com/support/revit-products/learn-explore/caas/CloudHelp/cloudhelp/2016/ENU/3PP-REV-COLLAB-ASCENT/files/GUID-D0E7774A-196C-4555-A7E2-83F97BF5E4FB-htm.html)**
>
> User-created worksets are the main ones you work in as you add and modify elements in a project. There are also three other types of worksets you can use: View, Family, and Project Standards. View Worksets View worksets (shown below) are...

---

<div class="post-metadata">

**Author:** ![lucamanzoni](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/lucamanzoni/32/56718_2.png) [@lucamanzoni](https://forum.dynamobim.com/u/lucamanzoni)\
**Post date:** [November 21, 2018, 12:44pm UTC](https://forum.dynamobim.com/t/set-workset-parameter-from-instance-type-parameter/28750/3 "2018-11-21T12:44:02Z")

</div>

Hi,  
You can use nodes from Archilab and Clockwork packages to do it.

In this example I set a type parameter for a family (but it can be also an instance parameter, in that case the workflow would be similar) as you suggested, and use this information to move the objects to the relative workset.

 ![SetWorksets](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/7/c728f4c934da1e0bc7523f992ce3e970d6a690c9.png)

The question is: how do you populate the family parameter? I mean, what is the relation between the family and the “correct” workset? The category?

---

<div class="post-metadata">

**Author:** ![c99417952](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@c99417952](https://forum.dynamobim.com/u/c99417952)\
**Post date:** [November 21, 2018, 2:09pm UTC](https://forum.dynamobim.com/t/set-workset-parameter-from-instance-type-parameter/28750/4 "2018-11-21T14:09:58Z")

</div>

Let say we only use 100 electrical families in this company in any project. We have a local family directory that all modellors go to for our company families. Within each family (Family Mode) there is a Parameter I create called “Family Workset” or similar. I assign a workset name that aligns with our workset standards to this parameter manually for each one.

Later when I have completed my family directory, all modellors can load these families into any specific project and run a script to Get the information from this “Family Workset” parameter and set into the “Workset” parameter in the properties box.

Basically I want to do this to give more power to turning on/off worksets for visibility in Views. I feel restricted with using Categories… as an example…my Fire Alarm Panel is under Electrical equipment and not Fire Alarm Devices. So when I turn on Electrical Equipment to show Fire alarm devices I am showing more than I require.

That script although running clean did not populate my workset parameter…

I hope Im making sense

---

<div class="post-metadata">

**Author:** ![m.rijsmus](https://avatars.discourse-cdn.com/v4/letter/m/6f9a4e/32.png) [@m.rijsmus](https://forum.dynamobim.com/u/m.rijsmus)\
**Post date:** [November 21, 2018, 2:42pm UTC](https://forum.dynamobim.com/t/set-workset-parameter-from-instance-type-parameter/28750/5 "2018-11-21T14:42:16Z")

</div>

I might be wrong here, but the way it is in my head is as follows.  
In a workshared project you have

- model (3d) elements in a workset controlled by you
- annotation (2d) elements in a view workset controlled by Revit
- families in a family workset when edited and not relinguished yet controlled by Revit
- and Project Standards worksets for line styles, object styles, and a lot of other settings controlled by Revit

This all to prevent multple users to edit the same object in the database at the same time until relinguished.

When a collegue edits a family it triggers the family workset to block other users to edit the family at the same time until released/relinguished.

Therefore editing the family workset is not advisable.

Can someone correct me if i’m wrong or incomplete?

---

<div class="post-metadata">

**Author:** ![lucamanzoni](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/lucamanzoni/32/56718_2.png) [@lucamanzoni](https://forum.dynamobim.com/u/lucamanzoni)\
**Post date:** [November 21, 2018, 3:52pm UTC](https://forum.dynamobim.com/t/set-workset-parameter-from-instance-type-parameter/28750/6 "2018-11-21T15:52:05Z")

</div>

So you have 2 phases:

A) Set for every family in your library a custom text parameter, called Workset Family, that indicate the correct workset to use for every specific family, when used in a project.

B) Run a script that reads the parameter and move the family to the correct workset.

This was clear since the beginning, what I showed is the way to perform phase B.

For phase A you need a batch process, that is opening all the families in the directory “Fire” and set parameter as “Fire”, “Water” and set “Water”, “Furniture” and set “Furniture”, …

You can probably use some nodes from Orchid Package:

 ![OrchidParameters](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/b/cb40f4c19b6efc5f6bcaccbf7a14bd04b6aefa60.png)

---

<div class="post-metadata">

**Author:** ![c99417952](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@c99417952](https://forum.dynamobim.com/u/c99417952)\
**Post date:** [November 22, 2018, 9:19pm UTC](https://forum.dynamobim.com/t/set-workset-parameter-from-instance-type-parameter/28750/7 "2018-11-22T21:19:51Z")

</div>

Hi Luca,  
The script on your first post…For me this creates a workset according to the name I create in the “Workset\_Family” parameter…however it does not set the name in this parameter to match the that in the “Workset” parameter…Should this be the case ?

---

<div class="post-metadata">

**Author:** ![c99417952](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@c99417952](https://forum.dynamobim.com/u/c99417952)\
**Post date:** [November 22, 2018, 9:36pm UTC](https://forum.dynamobim.com/t/set-workset-parameter-from-instance-type-parameter/28750/8 "2018-11-22T21:36:55Z")

</div>

![Document%20Close](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/0/00b126220a1ca174ce67dee6df4321e6d653f873.jpeg)

I have created a local Family folder with 7 families in it…The scripts works in that it creates a new parameter in all 7 called “Workset Family”…However there is an error in the “Document.close”…Also when I load these family into a project the “Workset\_Family” is not there…Any thoughts why this might be please ?  
[Create Workset\_Family Parameter.dyn](https://forum.dynamobim.com/uploads/short-url/qa3bBY503NFH7GoDb2jX4uYw8lN.dyn) (33.5 KB)

---

<div class="post-metadata">

**Author:** ![c99417952](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@c99417952](https://forum.dynamobim.com/u/c99417952)\
**Post date:** [November 27, 2018, 6:13pm UTC](https://forum.dynamobim.com/t/set-workset-parameter-from-instance-type-parameter/28750/10 "2018-11-27T18:13:54Z")

</div>

Hi all many thanks for your help…To solve the above issue I have to untick the “Read Only” tick box for all my families and this worked great…🙂

 ![Add%20Workset%20Family](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/a/a/aab78cec7147def8d5eb4c20aadf7cb7897ce6f2.jpeg)

Next I want to assign a value to this parameter in all these .rfa files but I am having trouble with the ‘familytype’ … for example some families might have different categories…What nodes would fix this? …thanks in advances

 ![Family%20Type](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/3/93039bb0d9484636d320e69e121ad6de5229c6b1.jpeg)

---

<div class="post-metadata">

**Author:** ![c99417952](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@c99417952](https://forum.dynamobim.com/u/c99417952)\
**Post date:** [November 28, 2018, 10:40am UTC](https://forum.dynamobim.com/t/set-workset-parameter-from-instance-type-parameter/28750/12 "2018-11-28T10:40:31Z")

</div>

Many thanks for your assistance…could it work from the nodes below…I know its incomplete but haven’t had time yet to finish…

 ![2018-11-28%2010_34_56-Dynamo](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/b/0b995b7a2d50e3c766f7e03abd3737ce096a78e1.jpeg)

 ![2018-11-28%2010_39_19-Greenshot](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/d/9dfc0ee32df3155de6ea776b21cd1283b9787d55.jpeg)

---

<div class="post-metadata">

**Author:** ![c99417952](https://avatars.discourse-cdn.com/v4/letter/c/898d66/32.png) [@c99417952](https://forum.dynamobim.com/u/c99417952)\
**Post date:** [November 30, 2018, 1:48pm UTC](https://forum.dynamobim.com/t/set-workset-parameter-from-instance-type-parameter/28750/14 "2018-11-30T13:48:18Z")

</div>

I have this script running without error…however it is not populating the parameter when I open up the family…Any ideas where I going wrong ? Thanks

 ![Set%20Value](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/f/3f162bfccf1dd56c9228b546a4e5ff2da42e6d2d.jpeg) [03\_Set Workset\_Family Parameter to Family.dyn](https://forum.dynamobim.com/uploads/short-url/fgtCsBftnM9HO5GXsqNsiJfRlqf.dyn) (39.2 KB)
