Auto Join Walls and Columns


I am currently working on a project where columns are not joined with walls. Is it possible to join all the columns with walls. Below is the Screenshot.

Thanks for your time.


The JoinGeometry method is looking for two elements, and you are feeding it two lists. You need to put in some loops. See attached image.


Thanks Ben,

For your support. I put loops but i get result Empty List. Am i missing something? below is the Screenshot.





results = [] (not “result”)

Out = results (not “result”)

Either way, the resulting output should not matter. What matters is what happens in Revit. Your script as is should be joining all of the columns and walls.


I tried restarting Revit still there is “Empty List”. I even tried in other workstations still the same result.

Any Suggestions?


Delete Lines 17 and 18 of your script (you have two sets of “IN”) . Then check line by line to make sure yours matches mine.

Lastly, check that the columns and walls you are joining are the same material, if the materials are different, Revit does not always like to join things.


I deleted line 17 & 18. I checked line by line no errors. Materials are same but still i get empty list. Is there any other way that i can join columns to wall?

Thanks in advance.

Please post a picture of your code. I’m pretty sure there are some other issues with it. For Instance : see image below taken from your previous post






Have you confirmed that you can join the two things manually (using the join command inside of Revit)?

Thanks Ben for your continuous support. I join manually its joining. I posted below Dynamo script. If possible can you send me your dyn file i will try with yours.



I did not mean to delete the whole “JoinGeometry” line, just fix the spelling error (it said JoinGeomentry)


Yes your right its a spelling error apologize for that. Its working now :-)

Thanks a lot,


Would it also be possible to switch the join order using this methodology? And would it also be possible to have all elements join in the same matter whichever way they started? ie. if you had a series of columns with a wall through them, some of them are <span style=“text-decoration: underline;”>cut by the wall</span> and some <span style=“text-decoration: underline;”>cut the wall</span>. to run something on all the columns and the wall and have all columns cutting the wall

Obviously the first part of that is pretty easy, just use JoinGeometryUtils.SwithJoinOrder
I was thinking that you could just unjoin them all, join them again, then switch there join order. Seems a bit messy though and obviously can’t all be run together


Yes. What you asked is possible. There are a number of methods for joining available. See link below. If you understand the script used above, you can substitute the other methods listed here to do the join switching, unjoining, defining which element cuts and which is cut, etc. I would suggest playing around with these other methods within the same script (replace the .JoinGeometry part with these methods) to understand better .

The trick is to determine which elements you want to be “cutting” and which you want to be “cut”. Then use some IF statements with the IsCuttingElementInJoin method. If true, SwitchJoinOrder, if False, do nothing.

I have a script that takes all struct columns and floors. To summarize the script from memory (I’m on my phone…sorry) If the columns are not of a concrete material, then I run an Unjoin with all of the floors. If the columns are concrete and the floors are not cast in place concrete, I run an unjoin. If the columns are concrete and the floor is concrete, I join them. If the floor is a slab on grade type of floor, then I switch the join with the concrete columns…

Its all simply a matter of sorting the lists into what should be cut and what should do the cutting. And that criteria is sometimes easier to accomplish outside of Python via Dynamo GetParameter nodes and FilterByBoolMask than it is to do inside of Python.


Wrapped it in a couple of ifs to check if the elements are joined and which is cutting which and it works like a dream!

You guys are brilliant. Its really great. I need to try also can you please share the script.



The script Ben provided is all that is needed and can be modified to suit using the members in the link he posted. Adding any of them to the end of Autodesk.Revit.DB.JoinGeometryUtils for example AreElementsJoined will change the behaviour of the script. So changing Autodesk.Revit.DB.JoinGeometryUtils.JoinGeometry to Autodesk.Revit.DB.JoinGeometryUtils.SwitchJoinOrder will instead of joining the 2 elements switch their join order but to run it effectively you will first need to check if they are in fact joined by using if Autodesk.Revit.DB.JoinGeometryUtils.AreElementsJoined wrapped around the code to switch their join order.

And as Ben said to feed it an element list you’re probably best using dynamo to filter each element list you feed it. Using nodes like categories and all elements of categories and running that through some sort of filter using filter by bool mask.

Hi Jimmy,

Thanks for replying, I tried as mention above but i get an error.Below is the screenshot.

I know that i am missing something, i am still new to Dynamo. Apologize for not understanding the methodology.


Hello, the script is working fine when there are a limited number of elements to be joined, however, when the project is large, Dynamo is getting stuck and eventually making the Revit model extremely slow even after the script has successfully executed (that too executes after more than 5-10 mins of processing). Any ideas on how we can improve the performance or optimize the way Dynamo is joining the elements? I don’t think this is a Revit issue because there is an add-in available which does a similar job, and it does it pretty efficiently.

My idea was to use Surrounding elements custom node available in Steam.Nodes to only input those elements which are touching each other, but I’m facing issues with that.