How to run a loop on a dynamo graph


#1

I’m thinking to run the same code in a loop until it reaches the maximum value in the integer slider. Is it possible in Dynamo. Something like the “for” loop? Also is there a way to automatically set the maximum value in the integer slider with the number in a list count.


#2

for loops are possible in Imperative code blocks.

You could also try using the LoopWhile node

As for driving the min/max value on sliders, I don’t think it’s possible.


#3

Hi Rooney,

I just wrote something about yesterday here http://dynamobim.org/forums/topic/scrolling-through-a-list/

I create a kind of summation (\sum)


#4


#5

Dynamo Language Manual

12. Looping


#6

Good Vikram, I like it.

I was just showing something very simple to loop a simple list. But with loop you can do something much more complex.


#7

Yeah sure.

The intent was to demonstrate that it can be done with OOTB nodes and Replication Guides in Associative code blocks too.