Order of Operations

Who can help me with the following problem

I made this node so i can isolate (Temporary Isolate Element) certain type of clashes.
For example Walls with Walls, Walls With Floors etc.

But every time i want to change a combination with the Number Slider (INDEX) i have to
Reset Temporary Hide/Isolate manually in Revit first before my nodes works (isolates).

What i really want is that, when i change the Number Slider (INDEX), my view gets reset first
and then the elements get Isolate.

I already have read some of the related topics but i couldn’t find an answer there.
I also tried a few thing myself but so far without any succes, so now i turned
to these forums hoping someone can help me.

PS I am still fairly new to Dynamo but i already made a few working graphs (by trail and error)
as i am learning on the job.

Clashing.dyn (35.1 KB)

Have a look at the Passthrough node from the Clockwork package.

I did that, but i don’t really undrstand how it works.
How / in what order do you plug in the other nodes?

If you search for „Passthrough“ on this forum you should be able to figure it out yourself.

I don’t wanna be rude, nor do i wan’t people to do my work for me,
and i appreciate any help, but as i said i looked at the topics about Passthrough, but i don’t get it how to connect it with the Isolate / Restore nodes…

The “waitfor” input should be the node you want to execute first. The “passthrough” input is the input you will give to the node you want to execute second.
The passthrough node will then output exactly the “passthrough” input, but will only output it when it receives the both inputs, hence the forced order of operations :slight_smile:

Hope that’s clearer !

1 Like

Thank you for your reply mellouze, that part i understood tho.
What i don’t know is how to connect the View.DisableTemporaryHideIsolate and
View.TemporarilyIsolateElement with the Passthrough. Do i connect the view or succes
outputs with it? Because i tried both but then it does not reset they previous ‘state’.
Instead all elements are Temporary hidden. So i guess i am missing something…

Could you show your graph with the passthrough node please ? :slight_smile:

Ofcourse

ClashIsolate.dyn (38.6 KB)

1 Like

Using either of the outputs from the first action should do it.

4 Likes

You read my first post too fast I guess :stuck_out_tongue:

1 Like

No, that is not working (i believe i tried it once before doing it like this).
The first time it Isolates the combination (ie. Floors - Floors) i pick with index,
but when i change te slider to pick a new combination (ie. Floors - Walls)
everything seems hidden (i don’t see any elements isolated)

Don’t know exactly how the nodes you are using are working, but have taken into account that all the nodes that do not depend on the input you are chaging will not be re-evaluated ? (it’s the cas of the node you want to execute first)

You can force the re-evaluation of the nodes by adding a passthrough before the DisableTemporaryHideIsolate, and connect the input you are changing (the slider) to waitFor

I partial / half get what you are getting it…

I think this is the problem

I believe i had the same problem with one of my other nodes
(i used to match / re-create a section box). I used the Booleans , == and if to re-evaluate by nodes there…
I guess i have to re-evaluate the Views too in the Node from this topic(?) I try a similar approach as my MatchSectionBox node.

I will see if i understand how to this part later (still got regular work to do as well).
Thanks for your help so far, appreciate it.

This is turning into an awfully long thread… :wink:
Here’s how:
grafik

4 Likes

Thank you for your help / input @Andreas_Dieckmann, much appreciated

…but no need for remarks like these. There are still people (very) new to Dynamo (like myself)
and may need a little more help / some futher explanations.
I am trying to sort things out myself as much as possible already…

Hey guys,

I know this is a fairly old thread, but I’ve been having an issue with the Passthrough block.
I have this script that:

  • Imports data from 2 Excel spreadsheets;
  • Creates a mesh made with point coordinates contained inside one of the Excel sheets;
  • Creates a metallic structure based of the mesh shape and of the materials in the other Excel sheets;
  • Creates a Section View;
  • Places the Section View in a Sheet with a custom title block;
  • Exports the Sheet with the section view into a PDF file.

However, the PDF printing function is executing before the structure assembly creation, which means that the PDF selection appears before the structure is even created. I tried to correct this by inserting a Passthrough block, but it seems to not be working.

What do I need to do here to make the script work as intended in the steps above?

Script bellow (Excel files included):
bars.xlsx (23.8 KB)
nodes.xlsx (16.6 KB)
structure.dyn (729.8 KB)

Script structure:

Any help is appreciated :slight_smile:

@joaofmoco Dynamo graphs will execute based on an AST (Abstract Syntax Tree) that is build when you click run on the graph :slight_smile: What this means in real-terms is that Dynamo will create the order of how the Engine will execute the Dynamo graph in the most efficient way possible.

Right now, your Create Structural Assemblies pathway is actually taking longer to execute than your Sheet creation process that ends up in PDF printing.

Any node that has no input will be ran at the same time, going downstream through the connected nodes via wires and execute as fast as it can based on this AST order. Some of these branches of your graph will execute faster than others.

So you can rightfully put in a Passthrough node to control that order :muscle: What you simply need to do is ensure that the final piece of your graph, the PDF creation bit, has to wait until the longest running piece of your graph, the Structural creation, is done.

So, as per this image, you can simply change the Wait For on your existing passthrough node here. Right now, as you are both waiting for and passing through the same node data, it’s redundant :wink:

1 Like

Hello and thank you for your reply :slight_smile:

I have implemented your proposed solution and the result keeps being the same. As in, the PDF creation is still being executed first.
Can it be that there’s another process being executed at the same time that takes even longer?
If not, what can be causing this?

Ok I simply looked based on your graph image, but is strange in this case as that was your only other path not connected :thinking:

I can download and take a look now to go deeper!