Calculate list values

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!

Create a new list with the values to be subtracted.


Wow Thank you very much Nick, thats so much easier and more elegant! :grinning::+1:

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?

Thank you again!

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

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.

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.

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.

Great:+1::grinning: Thank you again!

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?

Try geometry.distanceto