# Selecting Windows from their respective levels

**URL:** <https://forum.dynamobim.com/t/selecting-windows-from-their-respective-levels/83497>\
**Category:** Revit\
**Tags:** revit, geometry, dynamo, levels\
**Created:** [November 25, 2022, 12:39pm UTC](https://forum.dynamobim.com/t/selecting-windows-from-their-respective-levels/83497 "2022-11-25T12:39:30Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rstrinati](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@rstrinati](https://forum.dynamobim.com/u/rstrinati)\
**Post date:** [November 25, 2022, 12:39pm UTC](https://forum.dynamobim.com/t/selecting-windows-from-their-respective-levels/83497/1 "2022-11-25T12:39:30Z")

</div>

Hi All,  
I have a script that selects windows from their respective levels and applies a 2 digit level code derived from the level parameter. The script works fine, however it requires some user input with selecting the levels from the file. I am looking for guidance/ suggestions to create a neater solution of selecting elements per level.

Please see my current workflow below;  
Select level from Levels node, Select all elements on that level, Create a list of the separate levels, Use Element get category to filter the windows on each level.

As mentioned is there a solution to reverse the process and select all of the windows and then separate them out per level.

Many thanks in advance.  
Rico

 ![Windows_WriteLevel&CodeToParamater(Version 2.0.2)_2022-11-25_12-31-19](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/0/4081220b9347bc1ec86c2cdbd79de484af543a0f.png)

---

<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:** [November 25, 2022, 1:04pm UTC](https://forum.dynamobim.com/t/selecting-windows-from-their-respective-levels/83497/2 "2022-11-25T13:04:43Z")

</div>

Hi and welcome to the forum!

You could use these nodes (if you are using every single level)

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/a/1a65bfd1fd55733d0415236300b67704c2650527.png)

---

<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:** [November 25, 2022, 1:08pm UTC](https://forum.dynamobim.com/t/selecting-windows-from-their-respective-levels/83497/3 "2022-11-25T13:08:50Z")

</div>

To your second question, you could reverse the progress like so:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/0/305de7fbcc2c5f9ef3d6eed470ca1d6a1bf8b092.png)

---

<div class="post-metadata">

**Author:** ![rstrinati](https://avatars.discourse-cdn.com/v4/letter/r/85f322/32.png) [@rstrinati](https://forum.dynamobim.com/u/rstrinati)\
**Post date:** [November 25, 2022, 5:11pm UTC](https://forum.dynamobim.com/t/selecting-windows-from-their-respective-levels/83497/4 "2022-11-25T17:11:31Z")

</div>

Thanks MVE, that was super helpful. Ive aligned the script to your suggestion and its working well.

 ![Windows_WriteLevel&CodeToParamater(Version 2.0.2)_2022-11-25_12-31-19](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/3/834fb7c6d56a98c680bb5d8b9e05e879cf2ed8b5.png)
