Why not add periodic evaluation into Dynamo?

Ben Goh talked about it 17 december 2014

Technically it’s been available for a while. However the only way to expose it, is to create a custom c# node. The only OOTB node that supports the functionality is “Web Request” :

2015-09-13_13-54-07

When Periodic mode was made available to developers, we specifically did not make a “Periodic.Run” node, or something similar, because we didn’t want users to abuse the functionality. Imagine you’ve got a complex graph running on top of Revit. Each evaluation of the graph generates or updates 1000 elements in Revit. You want this to happen continuously, for some reason that I’m sure is very well-intentioned, so you add a Periodic.Run node (my fictional node). Because Revit is, well…Revit, the execution of Dynamo and the subsequent update of Revit take longer than the 3 ms that you think they should - having set the Period to 3ms - and everything just freezes. Dynamo seems broken. You are upset. No one is happy.

Developers who enable the Periodic functionality do so fully aware of the possibilities and limitations of the functionality, and are the best judges of the appropriate user experience given whatever they are allowing you to do. For the time being, we are going to leave it in their hands to implement Periodic functionality in a limited context. Of course, I could be convinced otherwise. What is it that you want to do?

//What is it that you want to do?//

Ian, I am honored to get your answer.

Python script does not work if you do not change the external effects at startup.
We need to think about its automatic regeneration.

Creating boolean input (restart) - is not an option

Thank you for understanding.

Respect from the creator of the site dynamobim.ru (russian community)

Sounds like an answer the government would give… “We want to protect you from yourself.”

How about just a periodic node that would control the overall execution interval instead? I built a pretty long script recently that basically pushes property data around to allow us to use a single multi-category schedule for pipe, fittings, and accessories. The problem with it running in “Automatic” mode is when any type swaps are performed in bulk. Properties are written, parts are swapped, properties are written again, creates a substantial lag on a larger project with 2000+ fittings. After the type swaps are performed and clicking “Run” in Manual mode, it only takes a second to push the data around where I want it. If I could set a timer that lets the script operate when the CPU is at idle (Yeah, I know, a lot more complicated, probably not possible thru dynamo.), or a timed interval AFTER parts have been swapped it would be great!

I created a timer/counter for a bit of fun so I could make a functioning clock in dynamo. Was pretty easy, then used the counter to iterate through list of elements and mapping other lists of data in the graph to write to the element parameters using counter value as index (setting a generous time to update). Was going to use it to automate construction sequences through time but haven’t looked into that yet. It would be nice to have a node to receive a callback after Revit has completed a task so it can increment and a way to abort w/rollback the transactions while the node was active. This would avoid conjestion writing to Revit although it wouldn’t be a timer as such.