# Join parallel (and adjacent) walls

**URL:** <https://forum.dynamobim.com/t/join-parallel-and-adjacent-walls/15338>\
**Category:** Revit\
**Created:** [October 4, 2017, 10:52am UTC](https://forum.dynamobim.com/t/join-parallel-and-adjacent-walls/15338 "2017-10-04T10:52:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![GregX](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gregx/32/56837_2.png) [@GregX](https://forum.dynamobim.com/u/GregX)\
**Post date:** [October 4, 2017, 10:52am UTC](https://forum.dynamobim.com/t/join-parallel-and-adjacent-walls/15338/1 "2017-10-04T10:52:31Z")

</div>

I am trying to find a way to automatically join parallel and adjacent walls (the way Revit’s UI does):  
 ![Collegamuri](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/e/3/e3d5cfa0b1c3b35feba83f443b47348d9fb06734.gif)  
In a project I’m working on I already have walls which are parallel and adjacent one another, and the only way I managed to join them (even with the UI) is by pretending to stretch a snap point:

 ![Collegamuri2](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/c/8c37a679adb456127464d07f7a47919217e294d8.gif)

Is there a way with dynamo/python/revit api to do this?  
I already tried the Hot Gear package and the variations of the [LocationCurve.JoinType property](http://www.revitapidocs.com/2018.1/00b7a1a8-0e12-d02e-7e25-4716baf6dcdc.htm) but this is just for walls that join at an angle ( ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/d/2df0d532794d0a1dc11c726fc71560da6d541a1d.png))  
The “Join” command does not work in the Revit UI and so it does not in python.  
I tried to disallow and then allow the [WallJoins](http://thebuildingcoder.typepad.com/blog/2011/08/wall-joins-and-geometry.html) both in the Revit UI and in python but nothing…  
I also tried the [AutoJoinElements](http://thebuildingcoder.typepad.com/blog/2010/05/autojoinelements.html) but still no luck. This last option is my best hope to get something working ([link](http://www.revitapidocs.com/2018.1/a3c929fb-6164-c7bb-d140-4178fb07fd4e.htm))

```
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *

# Import DocumentManager and TransactionManager
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application

# Import RevitAPI
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *

#INPUTS
bool=IN[0]
if bool:
	TransactionManager.Instance.EnsureInTransaction(doc)
	doc.AutoJoinElements()
	TransactionManager.Instance.TransactionTaskDone()
	ext="done?"
else:
	ext="not done?"
OUT=ext

```

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/7/e/7e678cb0df1fc2d5295585abbd085975af1daca8.png)
