Force Order Of Operations

Where can I find this node “Input.Wait”, is there a package available to download

[SendThis,AfterThisFinishes][0];

This is really neat but @jacob.small, can you explain to me how this actually works? :confused:

Sure thing! Element by element it’s doing this:

[ opens a list
SendThis is the variable which you want to pass along
AfterThisFinishes is the variable which you need to complete first
] closes the list
[ after the list starts a ‘get item at index efforts
0 is the index of the object we want to get
] wraps the object selection

Because Dynamo can’t build the list until the thing we want to pass along and the thing we want to wait to finish are both received, it can’t execute the code until the thing you need to wait for is done.

One advantage of this over the typical WaitFor methods is that we can wait for many things, or pass sets of things. One such example with less explicit names:

collectedSet = [pass1,pass2,wait3,wait4];
readyPassthrough1 = collectedSet[0];
readyPassthrough2 = collectedSet[1];

If the pass1 variable was the list of areas for calculating room occupancy downstream; and the pass2 was the list of elements in the egress path to check sizes downstream; and wait3 was the rooms in the model which have their occupancy calculated upstream; and wait4 was the list of code data loaded from an external source upstream;
Than this would ensure that the code data was loaded and room occupancy was calculated so that areas would sum the room areas after the occupant loaf of rooms was set, and that the element sizes were checked after the code was loaded, rather than potentially using old data for room occupancy and code data to get the answers the graph would have given you if the two sides of the code block were separate graphs run out of order.

Hopefully that is clear, if not I can give a functional toy example later. :slight_smile:

4 Likes