Assigning Workset from Existing Parameter

Hello everyone,

I am someone who is trying to learn Dynamo lately.

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

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

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

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

This is the error message

Thanks. I tried but still giving the same error

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

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

You did not change my original suggestion


Oh no I did. I just undo it. Here is the new version

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

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

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.

Ohhhhh now it worked completely.

Really appreciated

1 Like

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

2 Likes