How to generate an input to vary over time?

celosia horizontal dynamo 002 I’m working with a program for generating the periodic rotation of an element. For this I need to generate a value (eg 10) which is then transformed into the time ( eg 20) and thus to reach a final number . It is not the same as a list , but need a number that is constantly changing.


Do you mean like having a rotation angle for each hour of the day?

Hi Dimitar, I mean exactly that, but whit a “play and stop button” for example (not with a slider).

This is what I have by now.

I have a little trick that can do that with the help of the “Web Request” node. It is the only node OOTB that enables periodic runs of a graph. You also need a simple web address that changes every time you refresh it, like for example this one:

Now you can refresh any custom node or function, as long as you have the result of the “Web Request” node as an arbitrary input.

I use this workaround to generate a simple text file that acts as a buffer holding the current position. Then every time the “Web Request” node updates, I update my buffer.

Tho if you use it for graphically heavy graphs, you have to input a big enough pause in the periodic run so that the graph has enough time to refresh its graphics! Because the below is a relatively simple graph, a pause of 1500ms (or 1.5 seconds) is sufficient.


1 Like

Hi Dimitar,

I have replicated the code block you show above that deals with the increments, but isn’t working for me. Is that buffer a .txt file with just a 0 value? Can that not be an excel?

Is there anything else, another method I could use for periodically, every “n” second, I get an X+1 value…1, 2, 3…etc.?
I need to use it for a Phasing exercise and would have to change the Phase in a view every 2-3 seconds.
You help would be much appreciated.

Kind regards.

Hi @john1,

I made a node for this a while back to iterate phases and animate in Dynamo. It’s a simple counter node which increments by a step value over time…

It can be used with phases like so…

But be careful not to set the periodic evaluation too fast as Revit needs time to redraw the graphics and you will end up with a blue circle.

You can find the .dll here, be sure to unblock it first before importing the library into Dynamo.

Another cool way you can use it…

Hope you find this useful.