Auto Joining between Elements in Revit

February 6, 2020

 

Many clashes develop due to joining issues, so the below script is the prefect solution to eliminate these clashes and reduce the time spent on joining manually. Depending on the interference check that you can run inside Revit, the script will read the clashed elements and study the ability to join/solve them. Also you will be able to control the joining order between the elements. . (It’s applicable for the elements that have the same geometry).

 

 

 

 

 

 

The Script:

 

 

 

For Revit 2020 There is new update here.

 

Dynamo Script Request Here

Python Code:

 

  • You need to install the Springs node package.

 

 

Joining Eelements:

 

import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from System.Collections.Generic import *
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN

cond = IN[0]
x = UnwrapElement(IN[1])


TransactionManager.Instance.EnsureInTransaction(doc)
booleans=[]

if cond == False:
    for i in range (0,len(x)):
        for j in range(0,len(x[i])):
            try:
                JoinGeometryUtils.JoinGeometry(doc,x[i][0],x[i][j])
                booleans.append(True)
            except:
                booleans.append(False)
else:
    for i in range (0,len(x)):
        for j in range(0,len(x[i])):
            try:
                JoinGeometryUtils.SwitchJoinOrder(doc,x[i][0],x[i][j])
                booleans.append(True)
            except:
                booleans.append(False)
TransactionManager.Instance.TransactionTaskDone()

#Assign your output to the OUT variable.
OUT = booleans

 

 

Please reload

Our Recent Posts

Auto Joining between Elements in Revit

February 6, 2020

Best practice for Clash Detection (Revit/Navis/Dynamo)

February 6, 2020

Floor Slicing

June 11, 2019

1/4
Please reload

Tags

Please reload

©2018 by Nawar.

  • YouTube Social  Icon
  • LinkedIn Social Icon