Run two scripts at different times

Is there a way to run two scripts at different times

You can use a simple Python as below
this will return IN[0] to OUT after read IN[1]

where do I find this node

I just renamed the Python script node after write the code in it.

Ive got the code like yours but its not changing the node

Ok I found it. But now its not running the second part

Use + button to add IN

okay but now this part isnt running at all

U totally don’t understand.
Connect the result of the first group to IN1,
And insert the Python node between the first 2 nodes of 2nd group.
The Python will return the first data of 2nd group to OUT after read the result of 1st group…

Im completely new to dynamo. So I dont know where to obtain the end result. the out put changes the lintel size which varies between length sizes

One thing u have to remember is that nodes in Dynamo return data to right from input on the left.

These might explain things a little better. The point is to have the waitlist be the last output of your first operation (so you know it finished) and the outlist be the first input to your second operation (to kick it off).


Okay so with what Hyunu has given, how do I run the second part without having to create a new workspace? Ideally it needs to run number 1, then run 2.

To give background to understand what its doing: the first part changes the lintel size based on its length. The second part extends the ends of the lintel based on the existing length. The issue is the script does both at once and the outcome is not right.

Your explanation clears up what the wait node does, but how do I execute the second part? Do I press run again or what do I do? What do I need to write within the code block so to execute the 2nd part after the first?

If I knew a bit better about the syntax it would be better but in my mind all I want it to do is

1: run first bit.
2: dont run first bit. Run second.

Ahh. That is totally different. If you want to control if a portion of your code runs you’ll likely have to deal with errors and warnings. You cant really keep part of a graph from running (unless you manually freeze it), but you can provide it with null or empty inputs so that nothing happens.

I would break these into two different graphs if that is the case. You’ll get better results and will have less error handling/suppressing/data verification to deal with.

1 Like

If you have multiple inputs you want the user to pick after each other (and after running parts of the script in between) i would recommend to look into the Data-Shapes package. If you need some help with that i’ll be glad to help :slight_smile:

@Daan Where can I download? @JacobSmall It definitely would be a lot easier which is what I have now, the script I have now works very nicely. Its just about eliminating the part of human error

If you think it’d be easier to combine them, the Datashapes package is the way to go… You can download the package from Dynamo’ in app package manager, here: