Python script adjustment to obtain iterative output

Dear team,

My question is related to running a script and the way it is executed in Dynamo.

As example i included a simple example to illustrate my issue.


Be able to run an iterative script and on each iteration visualizing the itterative action (in this case writing a random line that starts at the end of the previous one).


The way i stated the code Python/Dynamo will directly iterate all the steps and produces the end result at once.

I would be helped to know if python/Dynamo allows for showing a step by step visualizing the output (in this case providing output of the lines one by one and accumulating till the end result).

a push in the good direction would be of great help

warmest regards, Dino


I’d hate to say it but it sounds like Dynamo isn’t the right tool for this task. If you really want to stick with Dynamo & Revit for this, you’ll need to convert the core line generation function into a custom node and then use something like the Dynanimator package. You’ll have to create a custom loop that generates a model line for each curve and then uses Revit’s built in image export to get the result after each step. You’ll find examples on how to do this in the repository above.

This is going to be a lengthy process and there’s probably countless graphing and scripting tools out there that will do this in less time and with much less effort…


Thank you for your thoughts and clarification. it helps to know its not the (elegant) way forward within Dynamo itself .

warmest regards,




I might have been a bit quick to judge. After some more thought, there might be a simpler alternative. You could use a principle similar to the one shown here:

and generate an iterator that progressively fetches more curves with each iteration. In principle it would look like this:

If you REALLY wanted to do this, you could create a node in VisualStudio and turn on Periodic Update. You’ll find most of the code on the Dynamo GitHub in examples. I’ve messed around with it quite a bit and it’s pretty fun.

Controlling Revit Geometry

and controlling Dynamo Geometry