Updating graph data in a loop

Hello everyone,

Maybe it will be useful for somebody:)
So I was missing the possibility to update output of the graph continuously in a loop. (or maybe just didn’t know how to do it).
I have managed to come up with a possible workflow with serializing and buffering data in a file (tried in a memory - didn’t work out so far).
I have created two helper ZeroTouch nodes for that, but it is also possible with Python nodes using pickle.

So, the first node (LoopStart) tries to read data from previous iterations and if they are not present it uses init data.
The second node (LoopEnd) writes the data back - after it has been modified by the script within the loop.
Everything is running in the periodic mode with datetime.now as a trigger.

This configuration enables Dynamo to run stuff like generic algorithms and preview each step.
Below an example of a classic Game of Life application:
loop

It is possible that I might share this in a node package. Let me know if you find it useful or interesting :slight_smile:
It should accept different kinds of data, but I haven’t tested it heavily yet.

10 Likes

Very interesting to see this. If you could really loop the entire script this can be extremely usefull!

1 Like

I pushed those nodes on Saturday to the Dynamo package manager - so you can try it :slightly_smiling_face:
It is part of the Onion package.
If you test it or run into any problems let me know!