Simple infinite loop in Anemone

I’m seriously new to GH and need help with a basic Anemone loop.
I want to set up an infinite loop to run and record data until I exit the loop with a boolean toggle.

See attached file for what I’ve got so far - I think it need only a minor tweak to get it on track.
any help is appreciated :pray: :pray: :pray: (13.6 KB)
ANEMONE-02.3dm (40.4 KB)

Hi @ferg_m ,

“infinite loops” are usually dangerous in programming. While there are use cases for them, they should be used with caution.

Currently the limiting factor is your slider input of 99 being fed into the repeat input.

Attach a boolean toggle to the exit input of your right most loop end component.

Increase your repeat slider value to say 1000 and rerun your loop.

It should now iterate up to 1000 times or stop if the exit boolean is toggled. Whichever comes first.

Hope that helps,

As an example, here’s 1000 growth iterations completed:

Graph Space: (11.5 KB)



Very much appreciated!

1 Like

Happy to help! Have a good loop! :upside_down_face: