# Repeat proces for selected list items

**URL:** <https://forum.dynamobim.com/t/repeat-proces-for-selected-list-items/31223>\
**Category:** Geometry\
**Tags:** dwg, dynamo, list-filter\
**Created:** [January 25, 2019, 1:02pm UTC](https://forum.dynamobim.com/t/repeat-proces-for-selected-list-items/31223 "2019-01-25T13:02:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacko](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@Jacko](https://forum.dynamobim.com/u/Jacko)\
**Post date:** [January 25, 2019, 1:02pm UTC](https://forum.dynamobim.com/t/repeat-proces-for-selected-list-items/31223/1 "2019-01-25T13:02:46Z")

</div>

Hello,  
I’m working on a script for urban planning and I’m trying to extrude buildings to a certain heights.  
I have prepared a dwg with layers that names contain short name of the building and it’s height.  
For example: “\_ECS-20” it means ‘ECS’ is a building name and ‘20’ is the height.  
That information is used to make an extrusion of curves for a given vector z.  
So if I connect my script manually it will work (1st screen), but I don’t know how to organize lists and filters to repeat that extrusion process semi automatic (2nd screen).  
Sometimes there are 4 layers for 1 building.  
I do not know where to take the next step… ☹  
Any ideas, please? 🙂

 ![Heights_00](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/0/f08c9a5a060863266fa373e601a2d596bc58e346.jpeg)  
 ![Heights_01](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/f/ef6db31826daa044a0336d720185b489dc702502.jpeg)

---

<div class="post-metadata">

**Author:** ![SeanP](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/seanp/32/42560_2.png) [@SeanP](https://forum.dynamobim.com/u/SeanP)\
**Post date:** [January 25, 2019, 7:29pm UTC](https://forum.dynamobim.com/t/repeat-proces-for-selected-list-items/31223/2 "2019-01-25T19:29:17Z")

</div>

Try changing the “List Level” (Play Button Triangle Next to the Input) on your List.LastItem node. This should allow you to get the “last” item from both lists rather than just the last list which is the two values you are getting.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/8/e8a31485ae5d76d0091d8bdac87949d455f7495e.png)

---

<div class="post-metadata">

**Author:** ![Jacko](https://avatars.discourse-cdn.com/v4/letter/j/4af34b/32.png) [@Jacko](https://forum.dynamobim.com/u/Jacko)\
**Post date:** [January 30, 2019, 1:42am UTC](https://forum.dynamobim.com/t/repeat-proces-for-selected-list-items/31223/3 "2019-01-30T01:42:18Z")

</div>

That was it! Thank you so much! 🙂
