# Calculate list values

**URL:** <https://forum.dynamobim.com/t/calculate-list-values/20297>\
**Category:** Lists-Logic\
**Created:** [March 21, 2018, 8:44pm UTC](https://forum.dynamobim.com/t/calculate-list-values/20297 "2018-03-21T20:44:11Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![msy](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@msy](https://forum.dynamobim.com/u/msy)\
**Post date:** [March 21, 2018, 8:44pm UTC](https://forum.dynamobim.com/t/calculate-list-values/20297/1 "2018-03-21T20:44:11Z")

</div>

Hi Forum,

i want to subtract every value in this with the next value to get their difference out. I have managed to get every single value from the list with the “List.GetItematIndex” node. My question is now, how can i do that without any user Intervention to get the DIfference of the values in the list. Or is there another, simpler way to do that?  
Thank you in Advance!

 ![Home%20Bild](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/3/b/3b3178a8e7c5603cb32259814cf605e8c97975c8.PNG)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [March 21, 2018, 8:50pm UTC](https://forum.dynamobim.com/t/calculate-list-values/20297/2 "2018-03-21T20:50:47Z")

</div>

Create a new list with the values to be subtracted.

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

---

<div class="post-metadata">

**Author:** ![msy](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@msy](https://forum.dynamobim.com/u/msy)\
**Post date:** [March 21, 2018, 9:08pm UTC](https://forum.dynamobim.com/t/calculate-list-values/20297/3 "2018-03-21T21:08:44Z")

</div>

Wow Thank you very much Nick, thats so much easier and more elegant! 😀👍

---

<div class="post-metadata">

**Author:** ![msy](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@msy](https://forum.dynamobim.com/u/msy)\
**Post date:** [March 22, 2018, 7:55pm UTC](https://forum.dynamobim.com/t/calculate-list-values/20297/4 "2018-03-22T19:55:03Z")

</div>

Hey Nick  
I still have a question in which I can not get any further, maybe you can also help me there. i want to combine the two lists, the lists are already in the right order. I want to set a parameter with the names in the first list and take the values from the second list. Can you perhaps suggest a solution?

 ![Unbenannt%20neu](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/1/d19d76591b9c452ba2b3f66031ed205c8c7a8113.PNG)  
Thank you again!

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [March 22, 2018, 7:59pm UTC](https://forum.dynamobim.com/t/calculate-list-values/20297/5 "2018-03-22T19:59:46Z")

</div>

I think you’re looking for the first output but I included the second one in case you wanted your items paired.

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

What are you going to do with your parameters and values? I only ask because if you’re wanting to give those parameters those values you’ll likely want to keep them separate.

---

<div class="post-metadata">

**Author:** ![msy](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@msy](https://forum.dynamobim.com/u/msy)\
**Post date:** [March 22, 2018, 8:32pm UTC](https://forum.dynamobim.com/t/calculate-list-values/20297/6 "2018-03-22T20:32:25Z")

</div>

Something like this, now I want to filter the values for each parameter from the list by typing the name. So here in this case, that would be, I enter “Terrace” and the list gives me the value for this would be 17.99. I do not know if I could explain it well what I mean.

 ![Unbenannt%20neu%201](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/b/6b095a8ed56ce03d18b92de99d20413a54b32819.PNG)

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [March 22, 2018, 8:46pm UTC](https://forum.dynamobim.com/t/calculate-list-values/20297/7 "2018-03-22T20:46:18Z")

</div>

I’m not sure what to do about your blank parameters but I think you’re looking for a dictionary. You specify which values go with which keys (parameters in your case). Then whenever you give the dictionary a key, it returns the specified value.

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/d/bd4ec2e2571442b2d341094a77bec5d6ff543d89.png)

---

<div class="post-metadata">

**Author:** ![msy](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@msy](https://forum.dynamobim.com/u/msy)\
**Post date:** [March 24, 2018, 8:58pm UTC](https://forum.dynamobim.com/t/calculate-list-values/20297/8 "2018-03-24T20:58:01Z")

</div>

Great:+1:😀 Thank you again!

---

<div class="post-metadata">

**Author:** ![msy](https://avatars.discourse-cdn.com/v4/letter/m/97f17d/32.png) [@msy](https://forum.dynamobim.com/u/msy)\
**Post date:** [March 24, 2018, 9:14pm UTC](https://forum.dynamobim.com/t/calculate-list-values/20297/9 "2018-03-24T21:14:55Z")

</div>

Hey Nick, I need your help again, I have the following problem, I need the distance of the outer wall to the property line, but first I have to check if the property line and the outer wall are parallel. if that’s the case i need the orthogonal distance. if that is not the case i need the shortest distance. how can I proceed best? i guess i need the wall and the property line as vectors, but how do i continue after that?

 ![DynamoForum](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/b/0ba8ce8212b888629d89c68f1a741696aa22dc7d.jpg)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [March 24, 2018, 9:20pm UTC](https://forum.dynamobim.com/t/calculate-list-values/20297/10 "2018-03-24T21:20:05Z")

</div>

Try geometry.distanceto
