Combine python script and dynamo script

Hi All

Is there a way to combine the two below, so that the python runs after the complex dynamo script?


There are a couple of ways to accomplish this. You can incorporate a passthrough or wait node between the rest of your graph and the Python script. Depends on the nodes you are using, some work well with passthrough (clockwork) and some not so well. You can modify your python code to look for a bool true before running, and have your existing graph provide the true input after it completes. Search the forum for “Python wait for” or something similar and you should get multiple results

problem is I have no idea where to place the python script or where to connect it to in the first script. node. If I connect it to the end of the complex script would it run after? Its a matter of knowing how to connect it and IM not sure how to do this

Try something similar to this
Then adapt it to your Python script

EXPORTMULTIPLESCHEDULES.dyn (55.5 KB)
test.dyn (3.1 KB)
these are the files I need to combine. Im working with schedules not parameters

write a code block like this for example to do the same than the Passthrough package node:

[pass,wait][0];

pass: the data wanted to feed in python IN[0]
wait: the output of any other node or process in the script, so until this output is not finished, the python node does not get the input and start to run.

You can put this inside the python node as well and add a second input to wait for

i think my issue is I dont know where to plug this information in so it can work. Im trying this but its not running

so please share an image here that can be read properly, you can use the button symbol of screenshot of Dynamo

you got that passthrough function already in the script, the package node can be replaced by the code I proposed:

You’ll have to place the Python script after the PassThrough node, like this:

Also, if you have multiple outputs on where you want the script to (force) execute them first, use something like this:


PS: If you have no specific inputs you can just put in whatever you want as input for the Python node. If you have some inputs, just feed them through where the string is now.

1 Like

thanks all! they are actually both a solution so now I can finally finish off this project