Dynamo 2.0 - subtract list with 1 value from a list of many values


I just stepped up from Dynamo 1.3 to Dynamo 2.0 and are trying to re-run a dynamo script which was working before. With dynamo 2.0 are obviously some new issues with the lacing options in dynamo but I still don’t get it right.

Beneath the picture of my problem: In the “Watch”-block should be actually a whole bunch of values that are created by the code block in the middle. Any solutions out there? I just don’t get it right even if I use the list@sublist codes.

Thank you

Please post your graph from 1.3 indicating the area where it’s failing.


I guess to achieve what you want :

  • Either replace list[0…2] by List.Flatten(list[0…2])
  • Or replace l1[0]-l2[0] by l1[0]-l2[0][0], and so on for Y and Z (l2[1][0] and l2[2][0]).

(don’t do both)

Thanks mellouze! That is working. What is the second “[0]” in your last point doing?

In your graph, you were subtracting a list from a list. The second [0] allows you to get the value (4529995.2105) and not the list ([4529995.2015]).

Ah ok. Thank you! Strange then that it was working in 1.3

I think it is because of lacing.

In 2.0.1, my guess is that :

  • [1,2,3] - 1 = [1-1,2-1,3-1] = [0,1,2]
  • [1,2,3] - [1] = [1-1,2- empty set, 3- empty set] = [0] (i guess lacing is automatically set on shortest)

If you switch to the node version of the subtraction and set the lacing on longest rather than on automatic, you will get the result you want.

Ok. That I should keep in mind. With the “-” node i also got it to work now.
Thanks for your help!!