Multiple scripts in a row

Hello everyone,
I was searching forum and found this topic about sequence of scripts.

According this topic only solution to restart Revit automatically. Maybe someone can update their experience in it?


Thank you in advance.

Most of the times, an EndTransaction node will finish the first part
A WaitFor node then could start the second part.
All in one script

1 Like

@Marcel_Rijsmus, thank you for your reply.
I found only those two. Where I can find WaitFor?
image

Those are the ones i meant
sorry.
but apparently it was good enough for you to find them :slight_smile:

I don’t understand which input works first. According describtion waitFor is first, but it is not possible in my case!


Последовательность скриптов [добавление фильтра, назначение фильтра].dyn (46.3 KB)

first
1 >>finish
then 2
so move the green stuff to the right and find what executes first, wait for that

www.orkestra.online will do that

1 Like

The paid one or the free one?
I’m dutch, sorry

2 Likes

Looks like you have it backwards, the blue group node should be plugged into the waitFor, as you’re waiting for this to run before you execute the next command. Then you passThrough the green group. Seeing as you want to overriiide the filter that is being created, why don’t you just feed that directly into the ‘parameterfilter’ input rather than selecting it from a list of all filters?

another option could be Birdtool and its free :wink:

2 Likes

… both :slight_smile:

1 Like

@ppittas @Marcel_Rijsmus

Yes, you are right.

Now I changed sides and trying to check it by watch node. After first click I have only filter created filter (grey) and the green part begin to work only after second click.


Dynamo (more or less) executes nodes in order of inputs. The passthrough node is specifically made to so that an input won’t be passed on until another input has been fully realized.

You want to plug the final output of the first section into the waitFor port and the first input of the second section into the passThrough port. The rest of section two comes after the passThrough node. The input for section two doesn’t get passed on to the rest of the group until after part one has finished executing.

Example: Let’s say you have to parts to your graph that you need to run in a specific order.

If you have both parts before the passthrough node then they’ve already finished running by the time the passthrough would do anything. A node can’t run until it has all of it’s inputs. So the idea with a passthrough is to “delay” an input until after the previous part of your graph has finished.

Now, the passthrough node can’t “finish” until it has both inputs ready (passThrough and waitFor). Which means Part 1 has to finish and hit waitFor before the passthrough node can pass the input from passThrough onto Part 2. Part 2 can’t start until it has the input from the passthrough node, so in turn it won’t start until after Part 1 has finished.

1 Like

@Nick_Boyts thank you, now everyting works fine!

1 Like

I think the Passthrough node was called Waitfor in an earlier version.
Hence my mistake