Run set of nodes after another set of nodes gets executed

What I am trying to do is to run the second sets of nodes only after first set of nodes gets executed. I have used Wait node and Passthrough node but nothing is working properly. Any suggestion would be most helpful.

Could you please upload a screenshot using the built-in “camera” tool of Dynamo?
All your nodes are now unreadable.

You could use a Python node that acts as a controlled gateway node. If all the inputs for the second set of nodes comes from the Python node then it will force the program to wait for the first group to populate all the required inputs before running the second group.

I can’t spot the passthroughs in that script, but that is 100% the way to do this. You will need to make sure everything executes after that needs to, even nodes that collect elements (so no using category dropdowns in the second step if they need to collect elements which aren’t made until step 1 ends for example).


I found out the main issue is with the script as I am trying to control the data flow for the script it’s returning an empty list at the end. But when I am freezing the last part and and individually running it, it’s working absolutely fine. Is there any way to bypass that issue.

clr.AddReference('RevitAPI')
clr.AddReference('System')
clr.AddReference('RevitNodes')
clr.AddReference('RevitServices')
import Revit
import RevitServices
from Autodesk.Revit.DB import *
from System.Collections.Generic import List
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
doc = DocumentManager.Instance.CurrentDBDocument

#Functions for list handling
def ProcessList(_func, _list):
   return map( lambda x: ProcessList(_func, x) if type(x)==list else _func(x), _list )

#Preparing input from dynamo to revit

def ToRevit(item):
	return item.ToRevitType(True)

if isinstance(IN[0], list):
	bblist = ProcessList(ToRevit, IN[0])
else:
	bblist = [ToRevit(IN[0])]

def collectElementsInBB(bb):
	outline = Outline(bb.Min, bb.Max)
	filter = BoundingBoxIntersectsFilter(outline)
	collector = FilteredElementCollector(doc, doc.ActiveView.Id).WherePasses(filter)
	return [e.ToDSType(True) for e in collector]

OUT = ProcessList(collectElementsInBB, bblist)

Drywall IFC Final with UI 30052022.dyn (147.3 KB)
This is the script.