Show created model lines during the graph operation

Hello all,

I am creating a graph that will draw a model line from each door to their “To Room” so it is easy to determine if the doors were placed correctly, and then flip them if not. I have two Data-shapes dialog boxes that pop up, one to select the levels and phases for the doors, and another to select which doors you want to flip. The problem I am having is that the model lines that are created between the rooms and doors are only visible once the graph is finished running. I need them to show up before the second Data-shapes dialog begins so the user can see which rooms they need to select. Any thoughts on how I can do this? I would like to avoid running multiple graphs if I can help it.


Not sure it would work, but try adding a ‘transaction.end’ node and then a ‘transaction.start’ node between the two sections of the graph.

I don’t really know how to use those nodes, however I tried putting them in and it didn’t work.


Any other ideas?

Not offhand - unfortunately the Revit window won’t display the updates until there is a regen run.

You could try putting a data.gate node or a similar ‘pass null’ method into place in between the two, or even freezing and unfreezing the transaction.start node, but in all cases there is an extra user input which has to be triggered.

I don’t mind if there has to be extra input, as long as I can do that in the form of a Data-shape dialog. Can you please explain what you mean by the data.gate and ‘pass null’ methods?

I guess that was my point - you would be be able to use Data Shapes for the Data.Gate node or the Freeze / Thaw method. You would need to actively alter the graph in Dynamo, and run it twice - first to make the geometry preview and a second time to set the values.

Data.Gate is a node in Generative Design which passes either one null or all the data, depending on if it is open or closed. You can read about it in the generative design primer here:

A ‘pass null’ method would be something like a true false toggle which if true returns the full data set, and of false returns null. In a code block it could look like this with testBoolean being the true/false input and data being the full data set:
indx. = testBoolean ? 0 : 1;
result = [data, null][indx];

Got it. Thank you for explaining it for me and for the link!

What I ended up doing was having Dynamo create a new line type, then associating all of the line types with the model lines that I am having it draw. Then a second Dynamo graph will be ran that allows them to be selected and deletes them afterwards by using this new line type. I think this will work best since I will be able to easily explain the process for each graph in the player and the Data-shape dialogs.

1 Like