# Run Action for all elements in list

**URL:** <https://forum.dynamobim.com/t/run-action-for-all-elements-in-list/3921>\
**Category:** Packages\
**Created:** [May 6, 2016, 2:15am UTC](https://forum.dynamobim.com/t/run-action-for-all-elements-in-list/3921 "2016-05-06T02:15:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bardur\_Thomassen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bardur_thomassen/32/6395_2.png) [@Bardur\_Thomassen](https://forum.dynamobim.com/u/Bardur_Thomassen)\
**Post date:** [May 6, 2016, 2:15am UTC](https://forum.dynamobim.com/t/run-action-for-all-elements-in-list/3921/1 "2016-05-06T02:15:35Z")

</div>

Hi

First of all, I’m a new beginner and this is my “Hello world” procject.

I want to get the heigest height of a wall.

It works when I only select 1 wall, but when I want to select by catagory(all walls) it won’t work.

Help?

 ![Screen Shot 05-06-16 at 08.41 AM](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/4/4376fbe13cb64a25a6d46ffddf5e599d22f93d03.jpg)

---

<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:** [May 6, 2016, 3:05am UTC](https://forum.dynamobim.com/t/run-action-for-all-elements-in-list/3921/2 "2016-05-06T03:05:46Z")

</div>

Hi,

You might be better served by fetching the walls’ BoundingBox. That way you can skip the computationally heavy geometry operations:

 ![2016-05-06_16-35-23](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/b/b4eada3fa7426fe02844f8adb79cbbde67d56c9d.png)

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [May 6, 2016, 3:10am UTC](https://forum.dynamobim.com/t/run-action-for-all-elements-in-list/3921/3 "2016-05-06T03:10:53Z")

</div>

While the problem you’ve mentioned can be resolved by changing the Lacing on some nodes

Here is an alternate approach (ver 1.0)

 ![20160506-1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/5/55f1d73440324b7912c0738511b73d1a3ea9b068.png)

---

<div class="post-metadata">

**Author:** ![Bardur\_Thomassen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bardur_thomassen/32/6395_2.png) [@Bardur\_Thomassen](https://forum.dynamobim.com/u/Bardur_Thomassen)\
**Post date:** [May 6, 2016, 4:16am UTC](https://forum.dynamobim.com/t/run-action-for-all-elements-in-list/3921/4 "2016-05-06T04:16:02Z")

</div>

Thank you for the fast answer.

BoundingBox is not exactly what I’m looking for. I can get this to work when i e.g. attach the wall to roof.

VIKRAM’s solutino is the right one.

But my problem is to get the z value in the list to the right wall element.

e.g.: Wall(parameter) element 1 will get z valu from 1. point in the list

Wall(paramenter) element 2 will get z valu from 2. point in the list

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [May 6, 2016, 4:39am UTC](https://forum.dynamobim.com/t/run-action-for-all-elements-in-list/3921/5 "2016-05-06T04:39:47Z")

</div>

Dimitar’s lower group of nodes will work just as well.

However, since by default Walls do not have a _‘Dynamo Z’_ parameter, I’ve assigned the values to the _Comments_ parameter

 ![20160506-1a](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/0/0d39843d911340a7f0bdb0f10aa1c1c485914d44.png)

---

<div class="post-metadata">

**Author:** ![Bardur\_Thomassen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/bardur_thomassen/32/6395_2.png) [@Bardur\_Thomassen](https://forum.dynamobim.com/u/Bardur_Thomassen)\
**Post date:** [May 6, 2016, 8:50am UTC](https://forum.dynamobim.com/t/run-action-for-all-elements-in-list/3921/6 "2016-05-06T08:50:04Z")

</div>

Yes thats right, Dimitar’s lower group dos the work just as well.

Thank you Virkam and Dimitar.

It did’t work at the first. I have put a List.flatten between List.MasimumItem and Code Block. Don’t know if this is the right way, but it works now.

&nbsp;

Thank you
