# Select Revit Elements from a List of Names and Assign to Workset

**URL:** <https://forum.dynamobim.com/t/select-revit-elements-from-a-list-of-names-and-assign-to-workset/44640>\
**Category:** Revit\
**Tags:** revit, dynamo\
**Created:** [December 18, 2019, 10:07am UTC](https://forum.dynamobim.com/t/select-revit-elements-from-a-list-of-names-and-assign-to-workset/44640 "2019-12-18T10:07:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreadnought](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@dreadnought](https://forum.dynamobim.com/u/dreadnought)\
**Post date:** [December 18, 2019, 10:07am UTC](https://forum.dynamobim.com/t/select-revit-elements-from-a-list-of-names-and-assign-to-workset/44640/1 "2019-12-18T10:07:43Z")

</div>

Hello everyone,

I’m trying to extract a list of floor types, filtered by name. I then want to take those filtered, and select the items in REVIT, so I can assign them to their own Workset. The small graph I have created (attached) allows me to generate a filtered list as I had intended, separating all items with the type name prefix ‘PTA-LF’ from those with a different prefix. I have identified nodes provided by packages that allow me to ‘Select in Revit’ (Springs/Modellical for example), and they seem to work when I use in conjunction with a simple input (e.g. when I plug in 'all elements of category directly, it successfully selects all elements), however not when i plug the list of extracted elements. Dynamo appears to have recognized these elements, but my selection in REVIT is not made. Am I missing a step here? Regarding assigning these elements to a workset, I havent got that far yet. Happy for suggestions on that as well!

 ![Select Elements by Name](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/4/b427b5c88a79a4237bc6a250aaf8af181b48df58.jpeg)

Many thanks for reading,

Hugo

---

<div class="post-metadata">

**Author:** ![khuzaimah.ElecEng](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/khuzaimah.eleceng/32/92768_2.png) [@khuzaimah.ElecEng](https://forum.dynamobim.com/u/khuzaimah.ElecEng)\
**Post date:** [December 18, 2019, 10:19am UTC](https://forum.dynamobim.com/t/select-revit-elements-from-a-list-of-names-and-assign-to-workset/44640/2 "2019-12-18T10:19:34Z")

</div>

use this concept to set workset instead of selecting in revit

> [@Setting Worksets for elements](https://forum.dynamobim.com/t/setting-worksets-for-elements/38918/2):
>
> You will just need to plug in your “Worksets” node into the archilab node “Workset.Id” which will give you the id of the workset. The id of the workset is the value that is used to set the workset of an element. Notice that in the warning it says “(Autodesk.Revit.DB.Parameter, double)”. This tells us that a double is the expected value type for the workset parameter, so any other type of input will not work. Best of luck with your script!

---

<div class="post-metadata">

**Author:** ![dreadnought](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@dreadnought](https://forum.dynamobim.com/u/dreadnought)\
**Post date:** [December 18, 2019, 11:12am UTC](https://forum.dynamobim.com/t/select-revit-elements-from-a-list-of-names-and-assign-to-workset/44640/3 "2019-12-18T11:12:10Z")

</div>

Thanks for your response khuzaimah. Still struggling. It won’t allow me to assign those elements for some reason, I am getting the following error message:

\*Warning: Element.SetParameterByName operation failed. \*  
_The parameter is read-only._

See below. Your comments are greatly appreciated!

 ![Assign ELements to Workset by Name](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/6/96bdcd9dee876cba3f84dc7afdf526b84556093e.jpeg)
