Python script node in manual only, input prior to run

Hi @kbzawork,

This actually does work when the run mode is set to Manual. The issue you’re likely seeing is that you’ve already run the graph once in Automatic mode, and then switching to Manual mode doesn’t cause the graph to run again. If you start out in Manual mode and run it for the first time, then it works as expected. Here’s why…

When you run a graph, Dynamo caches data about each node to compare with the next time the graph is run. If there are no changes to the graph, then Dynamo knows that it doesn’t need to re-run everything. Every time you make a change to your graph, the nodes that you change are marked as “dirty” so that Dynamo knows it needs to re-run them. And conversely, if you don’t change anything, then Dynamo assumes that a re-run is not necessary. The benefit of this mechanism is a performance boost from not running through the same operations repeatedly if the inputs haven’t changed.

So that is what’s going on with your Python script. It runs once in Automatic mode, then you switch to Manual mode and try to re-run it but the node isn’t marked as “dirty” and is not executed. There’s a couple ways you can get around it by forcing the node to be marked as “dirty”:

  1. Toggle the +/- buttons on the node to add/remove an input port
  2. Add a boolean toggle, as shown in this example
  3. Run the graph via Dynamo Player
1 Like