Ah sorry, I made a rookie mistake in my own example
Basically, the order of operations is not guaranteed in the above example. Even though the ProfileView.SetElevationRangeAutomatic
is visually to the right of the ProfileView.MinElevation
, that doesnât mean that it gets executed afterwards. So sometimes the minimum elevation will be returned before setting automatic back to true, and sometimes it will be returned after it has already been set to true. The order is not guaranteed since they are in parallel branches. This is referred to as a race condition in computer science parlance. Whenever an output appears to be randomly different between runs, itâs an indication that thereâs probably a race condition somewhere.
Anyway, so you just need to force Dynamo to execute things in a specific order. Itâs a helpful technique in many other cases as well. You basically set up a simple âgateâ that makes sure that certain things have to finish before passing along the output.
More info here: