# Assigning Workset from Existing Parameter

**URL:** <https://forum.dynamobim.com/t/assigning-workset-from-existing-parameter/104140>\
**Category:** Revit\
**Tags:** revit, dynamo\
**Created:** [September 5, 2024, 12:31pm UTC](https://forum.dynamobim.com/t/assigning-workset-from-existing-parameter/104140 "2024-09-05T12:31:29Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![eylulc](https://avatars.discourse-cdn.com/v4/letter/e/7cd45c/32.png) [@eylulc](https://forum.dynamobim.com/u/eylulc)\
**Post date:** [September 5, 2024, 12:31pm UTC](https://forum.dynamobim.com/t/assigning-workset-from-existing-parameter/104140/1 "2024-09-05T12:31:29Z")

</div>

Hello everyone,

I am someone who is trying to learn Dynamo lately.

I have a minor task (it is not minor for me)

 ![IMG-20240905-WA0025](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/0/40f463b2e2ef7abfc9a4a6ff8fa7ee9641fcb370.jpeg)

I am trying to assign every elements does not include “grid” word in certain parameter to the certain workset.

Like: Every ceiling element does not include the word “grid” in their XXX parameter should go into the AAA workset kind of a stuff.

But no matter how I try, I could not figure out the problem.

You can find the screenshots attached. Any help will be reallyyyy appreciated.

Edit: image updated

---

<div class="post-metadata">

**Author:** ![Garbage\_Collector](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@Garbage\_Collector](https://forum.dynamobim.com/u/Garbage_Collector)\
**Post date:** [September 5, 2024, 12:34pm UTC](https://forum.dynamobim.com/t/assigning-workset-from-existing-parameter/104140/2 "2024-09-05T12:34:45Z")

</div>

What does the error message say?

I think you just need to remove the List Map node, and feed the list directly to the Element.Setparam node

---

<div class="post-metadata">

**Author:** ![eylulc](https://avatars.discourse-cdn.com/v4/letter/e/7cd45c/32.png) [@eylulc](https://forum.dynamobim.com/u/eylulc)\
**Post date:** [September 5, 2024, 12:36pm UTC](https://forum.dynamobim.com/t/assigning-workset-from-existing-parameter/104140/3 "2024-09-05T12:36:30Z")

</div>

Warning: Element.SetParameterByName expects argument type(s) (Revit.Elements.Element, string, var), but was called with (Function, string, null).

This is the error message

---

<div class="post-metadata">

**Author:** ![Garbage\_Collector](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@Garbage\_Collector](https://forum.dynamobim.com/u/Garbage_Collector)\
**Post date:** [September 5, 2024, 12:37pm UTC](https://forum.dynamobim.com/t/assigning-workset-from-existing-parameter/104140/4 "2024-09-05T12:37:10Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/b/fb7167bc5c56b90cb82030d3b3c8d295043674d9.jpeg)

---

<div class="post-metadata">

**Author:** ![eylulc](https://avatars.discourse-cdn.com/v4/letter/e/7cd45c/32.png) [@eylulc](https://forum.dynamobim.com/u/eylulc)\
**Post date:** [September 5, 2024, 12:37pm UTC](https://forum.dynamobim.com/t/assigning-workset-from-existing-parameter/104140/5 "2024-09-05T12:37:56Z")

</div>

Thanks. I tried but still giving the same error

---

<div class="post-metadata">

**Author:** ![Garbage\_Collector](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@Garbage\_Collector](https://forum.dynamobim.com/u/Garbage_Collector)\
**Post date:** [September 5, 2024, 12:39pm UTC](https://forum.dynamobim.com/t/assigning-workset-from-existing-parameter/104140/6 "2024-09-05T12:39:13Z")

</div>

I think your not supplying a valid workset, can you show what the workset.id node is outputting?

---

<div class="post-metadata">

**Author:** ![eylulc](https://avatars.discourse-cdn.com/v4/letter/e/7cd45c/32.png) [@eylulc](https://forum.dynamobim.com/u/eylulc)\
**Post date:** [September 5, 2024, 12:42pm UTC](https://forum.dynamobim.com/t/assigning-workset-from-existing-parameter/104140/7 "2024-09-05T12:42:22Z")

</div>

![IMG-20240905-WA0027](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/c/dc1158d8fb34f2c7786c5ef13280b80bf8c0d6b9.jpeg)

This is what I am trying to do. I got the workset from name. And connected that to the ID because element.setparameter only works with Id (I guess)

But clearly I did something wrong

---

<div class="post-metadata">

**Author:** ![Garbage\_Collector](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@Garbage\_Collector](https://forum.dynamobim.com/u/Garbage_Collector)\
**Post date:** [September 5, 2024, 12:43pm UTC](https://forum.dynamobim.com/t/assigning-workset-from-existing-parameter/104140/8 "2024-09-05T12:43:12Z")

</div>

You did not change my original suggestion

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/6/b655afcc07ab627415b1373c5bccc31e6b5b837e.jpeg)

---

<div class="post-metadata">

**Author:** ![eylulc](https://avatars.discourse-cdn.com/v4/letter/e/7cd45c/32.png) [@eylulc](https://forum.dynamobim.com/u/eylulc)\
**Post date:** [September 5, 2024, 12:44pm UTC](https://forum.dynamobim.com/t/assigning-workset-from-existing-parameter/104140/9 "2024-09-05T12:44:18Z")

</div>

![IMG-20240905-WA0028](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/a/7a3be0f383f94464d526a36fb0f5eb0ca6926b13.jpeg)  
Oh no I did. I just undo it. Here is the new version

---

<div class="post-metadata">

**Author:** ![Garbage\_Collector](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@Garbage\_Collector](https://forum.dynamobim.com/u/Garbage_Collector)\
**Post date:** [September 5, 2024, 12:45pm UTC](https://forum.dynamobim.com/t/assigning-workset-from-existing-parameter/104140/10 "2024-09-05T12:45:55Z")

</div>

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/0/d01bf93b76eb6db4ed97f655cff29c9af2bbb538.jpeg)

You need to feed the list of elements into the list.Filterbyboolmask instead of the parameter values.

---

<div class="post-metadata">

**Author:** ![eylulc](https://avatars.discourse-cdn.com/v4/letter/e/7cd45c/32.png) [@eylulc](https://forum.dynamobim.com/u/eylulc)\
**Post date:** [September 5, 2024, 12:52pm UTC](https://forum.dynamobim.com/t/assigning-workset-from-existing-parameter/104140/11 "2024-09-05T12:52:24Z")

</div>

Yes, it worked. But the problem is, I was trying to make the elements which does not contain some certain parameter. That is why, I added not node. However, now it converted the element who has the word “grid” to the new workset.

But this was helpful anyway, thank you

---

<div class="post-metadata">

**Author:** ![Garbage\_Collector](https://avatars.discourse-cdn.com/v4/letter/g/da6949/32.png) [@Garbage\_Collector](https://forum.dynamobim.com/u/Garbage_Collector)\
**Post date:** [September 5, 2024, 12:54pm UTC](https://forum.dynamobim.com/t/assigning-workset-from-existing-parameter/104140/12 "2024-09-05T12:54:16Z")

</div>

You can remove the Not node then.

The fitlerbyboolmask gives you the true filter and false filter (in, out)  
So if you want only the elements that tested false, you take the ‘out’ output, if you want the elements that tested true, you can use the ‘in’ output.

---

<div class="post-metadata">

**Author:** ![eylulc](https://avatars.discourse-cdn.com/v4/letter/e/7cd45c/32.png) [@eylulc](https://forum.dynamobim.com/u/eylulc)\
**Post date:** [September 5, 2024, 1:00pm UTC](https://forum.dynamobim.com/t/assigning-workset-from-existing-parameter/104140/13 "2024-09-05T13:00:08Z")

</div>

Ohhhhh now it worked completely.

Really appreciated

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [September 5, 2024, 1:13pm UTC](https://forum.dynamobim.com/t/assigning-workset-from-existing-parameter/104140/14 "2024-09-05T13:13:18Z")

</div>

> [@eylulc](#):
>
> Ohhhhh now it worked completely.

Don’t forget to mark solutions so others can more efficiently learn from the conversation!
