# Select all elements on level and change to another level

**URL:** <https://forum.dynamobim.com/t/select-all-elements-on-level-and-change-to-another-level/1677>\
**Category:** Packages\
**Created:** [June 24, 2015, 11:45pm UTC](https://forum.dynamobim.com/t/select-all-elements-on-level-and-change-to-another-level/1677 "2015-06-24T23:45:24Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Dunn1](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@Michael\_Dunn1](https://forum.dynamobim.com/u/Michael_Dunn1)\
**Post date:** [June 24, 2015, 11:45pm UTC](https://forum.dynamobim.com/t/select-all-elements-on-level-and-change-to-another-level/1677/1 "2015-06-24T23:45:24Z")

</div>

Hi - just starting out on Dynamo and would like to run a script to select all elements on a particular level and move them to another level. I know this will have some limitations (like rooms, wall hosted elements etc) but would like to do what can be done.

I know my first run at the script won’t work since there are various parameters that need to be changed (level, base constraint, base level etc). How would I go about filtering out elements that don’t have the parameter I need to change? ![ChangeLevel](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/2/2d3d15a5ee484c8cf33d322cb9d612feec1fcb6b.png)

---

<div class="post-metadata">

**Author:** ![Dimitar\_Venkov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dimitar_venkov/32/2068_2.png) [@Dimitar\_Venkov](https://forum.dynamobim.com/u/Dimitar_Venkov)\
**Post date:** [June 25, 2015, 1:15am UTC](https://forum.dynamobim.com/t/select-all-elements-on-level-and-change-to-another-level/1677/2 "2015-06-25T01:15:07Z")

</div>

You could try extracting the element’s parameters similar to this:  
 ![2015-06-25_14-37-24](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/3/3a39464df40f51a1e2cdb54236a32bc47149d70d.png)

&nbsp;

&nbsp;

&nbsp;

Note that the lacing on the “List.ContainsItem” is set to longest.

---

<div class="post-metadata">

**Author:** ![Michael\_Dunn1](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@Michael\_Dunn1](https://forum.dynamobim.com/u/Michael_Dunn1)\
**Post date:** [June 25, 2015, 5:49pm UTC](https://forum.dynamobim.com/t/select-all-elements-on-level-and-change-to-another-level/1677/3 "2015-06-25T17:49:13Z")

</div>

Thanks. The filtering works great however why wouldn’t element.setparameter act on every element selected? Also, when I undo the action in Revit and run the script again I get a different result with different elements changing level. The warnings I get are all for trying to change read-only parameters which is understandable.

![ChangeLevel](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/7/7497f2bbb8256733daf6d522170ffcb428314b24.png)

---

<div class="post-metadata">

**Author:** ![Dimitar\_Venkov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dimitar_venkov/32/2068_2.png) [@Dimitar\_Venkov](https://forum.dynamobim.com/u/Dimitar_Venkov)\
**Post date:** [June 25, 2015, 8:34pm UTC](https://forum.dynamobim.com/t/select-all-elements-on-level-and-change-to-another-level/1677/4 "2015-06-25T20:34:19Z")

</div>

Not sure why it’s affecting different elements every time. Tho you can filter elements with read-only parameters with the “Element.ParameterIsReadOnly” node from the Clockwork package.

---

<div class="post-metadata">

**Author:** ![Michael\_Dunn1](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@Michael\_Dunn1](https://forum.dynamobim.com/u/Michael_Dunn1)\
**Post date:** [June 26, 2015, 1:13am UTC](https://forum.dynamobim.com/t/select-all-elements-on-level-and-change-to-another-level/1677/5 "2015-06-26T01:13:25Z")

</div>

Thanks for that. I can’t get my head around how to use the ParameterIsReadOnly node. Whether I use it with a list of elements or a single instance it always returns an empty list for me. I’m assuming this is the root cause of the other elements not changing level correctly. I’ve pulled it out of the rest of the script just to try to get it working at this stage. It works great with the Base Constraint and Base Level parameters.

![ParameterIsReadOnly](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/1/1566cb75c0d82e513f60d62b358e9cfd0f1be562.png) ![ChangeLevel3](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/3/3b6e6aa982668f07058a43917ec0ca9ad0eeec31.png)

---

<div class="post-metadata">

**Author:** ![Dimitar\_Venkov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dimitar_venkov/32/2068_2.png) [@Dimitar\_Venkov](https://forum.dynamobim.com/u/Dimitar_Venkov)\
**Post date:** [June 26, 2015, 2:22am UTC](https://forum.dynamobim.com/t/select-all-elements-on-level-and-change-to-another-level/1677/6 "2015-06-26T02:22:41Z")

</div>

You’ll need to combine “Element.ParameterIsReadOnly” with a “List.Map” node. Try something along the lines of this:

![2015-06-26_15-45-20](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/f/fbd60a52b1b5b64bfe6445773c27bbb19dd498ad.png)

---

<div class="post-metadata">

**Author:** ![Michael\_Dunn1](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@Michael\_Dunn1](https://forum.dynamobim.com/u/Michael_Dunn1)\
**Post date:** [June 26, 2015, 8:34pm UTC](https://forum.dynamobim.com/t/select-all-elements-on-level-and-change-to-another-level/1677/7 "2015-06-26T20:34:09Z")

</div>

Thank you so much for your help so far. I’ve done what you suggested and on the face of it I get the correctly filtered list but when I run I still end up with errors saying i’m trying to change a read only value and it won’t change every element in the list. ![ChangeLevel4](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/5/562a8e497c609b72555f8ae87e7e43ed832dc1d0.png)

---

<div class="post-metadata">

**Author:** ![Dimitar\_Venkov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dimitar_venkov/32/2068_2.png) [@Dimitar\_Venkov](https://forum.dynamobim.com/u/Dimitar_Venkov)\
**Post date:** [June 27, 2015, 7:57am UTC](https://forum.dynamobim.com/t/select-all-elements-on-level-and-change-to-another-level/1677/8 "2015-06-27T07:57:33Z")

</div>

Hi Michael, I’m not sure why the floor element is failing - it’s the only type that should work without a hitch. Doors and windows will give you an error as you guessed at the start. Just a shot in the dark here but one possibility is that when dynamo tries to process a door/window and gets interrupted by an unknown error the “parameter is read-only” debug message is returned by mistake?

---

<div class="post-metadata">

**Author:** ![Michael\_Dunn1](https://avatars.discourse-cdn.com/v4/letter/m/4bbf92/32.png) [@Michael\_Dunn1](https://forum.dynamobim.com/u/Michael_Dunn1)\
**Post date:** [June 27, 2015, 3:21pm UTC](https://forum.dynamobim.com/t/select-all-elements-on-level-and-change-to-another-level/1677/9 "2015-06-27T15:21:56Z")

</div>

No problem. I’ll keep plugging away at it and see what I end up with. Thanks again for your help.

---

<div class="post-metadata">

**Author:** ![tue\_kappel1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/tue_kappel1/32/8997_2.png) [@tue\_kappel1](https://forum.dynamobim.com/u/tue_kappel1)\
**Post date:** [September 7, 2015, 8:32am UTC](https://forum.dynamobim.com/t/select-all-elements-on-level-and-change-to-another-level/1677/10 "2015-09-07T08:32:34Z")

</div>

/Michael Dunn , did you find any any solution? I’ve got exactly the same problem…

---

<div class="post-metadata">

**Author:** ![111189](https://avatars.discourse-cdn.com/v4/letter/1/5f9b8f/32.png) [@111189](https://forum.dynamobim.com/u/111189)\
**Post date:** [January 29, 2016, 6:19am UTC](https://forum.dynamobim.com/t/select-all-elements-on-level-and-change-to-another-level/1677/11 "2016-01-29T06:19:09Z")

</div>

Hello! Where I can download “\<strong style=“font-weight: 600;”\>Element.ParameterIsReadOnly” ?
