Joining stacked walls with not intersecting walls - Revit Dynamo

Hello all,

I am at the very early stages of learning Dynamo and trying to optimalise the current workflow in a building company for my research subject by using automated scripts with Dynamo.

The current problem I am trying to solve is as following: Joining all layers of all existing stacked walls with the basic walls behind it (thermal wall), the current script I have made is selecting all stacked walls and existing walls in the project, but somehow not joining them when I run the script. I added some pictures to clarify what I’m trying to say.

Thanks in advance,


Please show us what you have done so far.
Do the walls join with manually running the join command from within the Revit UI?

Hi Viktor, I couldn’t respond because my account was being approved by one of the administrators (so was the second dynamo script picture I tried to upload)

The wall with the Revit UI won’t join if I click on the stacked wall, I would have to tab through the layers and select the layer I’d wish to join with any other wall. I tried to run a dynamo script earlier by selecting the different type of layers and joining their geometry with all other existing walls in the project, this unfortunately didn’t work either.

I am not completely sure, but I think that your problem is with your lists management. You are trying to join the first stacked wall with the first wall, the second with the second…

i agree, there is a problem with the lists. maybe a different node should be used to determine the elements correctly. try interference check node in springs package.

Hi Selim.
I tested it o my file and for me it works fine both through the UI in Revit and with the Element.JoinGeometry Node.
There is one weird thing though. The node returns False even though it actually joins the walls.

Hi Viktor,
That is odd… Did you try to use a stacked wall aswell? And what version of Dynamo and Revit are you using?

Revit 2018, Dynamo 2.02. But that shouldn’t be an issue.

Can you try that code in a python node:

import clr
from Autodesk.Revit.DB import *
from System.Collections.Generic import *
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

def tolist(obj1):
	if hasattr(obj1,"__iter__"): return obj1
	else: return [obj1]

doc = DocumentManager.Instance.CurrentDBDocument
items1 = tolist(UnwrapElement(IN[0]))
items2 = tolist(UnwrapElement(IN[1]))

for i in items1:
	for j in items2:
		except: pass

Just make sure you connect 2 flat lists or an element and a flat list to IN[0] and IN[1]

Hi Viktor,

To be honest I have no clue on how to use Python. Is it necessary to learn it in order to become good at using Dynamo? I have ‘fixed’ (more like a workaround) my script by selecting each stacked wall individually and joining them with other walls (also by selection) and using a different node.
Ideally I would have wanted to create a script that gets every stacked wall automatically and joins it with a certain wall function as in ‘Thermal/Air Layer’ in the project, in order to skip the selecting process.

This is how the very basic script looks like now: