04 Feb

Disallow Joins on Curtain Walls with Dynamo

Disallowing joins on Curtain Walls in Revit is tedious job.

Good thing is that it can be solved easily with a little help of Dynamo.

If you are like me, than you don’t like depending on various Dynamo packages, especially for something simple as this. With a little help of Python code, disallowing joins on Revit Curtain Walls automatically is easily achievable.

In Dynamo file there are two options (just connect appropriate lacing), disallow only selected elements, or disallow all Curtain Wall elements (instances) in the project model (as shown with orange line on the picture below).

If you are having trouble selecting only Curtain Walls, read article about hiding Curtain Walls and just invert the filter.

Disallow Curtain Walls Joins Dynamo script

Python node looks like this (see comments inside the code):

##### Start of generic stuff imports

import clr

# import Revit API
import Autodesk
from Autodesk.Revit.DB import *

# import Revit Elements
import Revit

# import DocumentManager and TransactionManager
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

# get current Revit document
doc = DocumentManager.Instance.CurrentDBDocument

##### End of generic stuff imports

# Unwrap input
inputs = UnwrapElement( IN[0] )
curtainWalls = []
# Initiate counter
n = 0

# Get only curtain walls from input
for e in inputs:
        elementType = doc.GetElement(e.GetTypeId())
        if elementType.Kind == WallKind.Curtain:
            n = n + 1
        print("not curtain wall")

# Start Transaction

for e in curtainWalls:
    Autodesk.Revit.DB.WallUtils.DisallowWallJoinAtEnd(e, 0)
    Autodesk.Revit.DB.WallUtils.DisallowWallJoinAtEnd(e, 1)

# End Transaction

# Wrap results
OUT = ["Disallowed joins on walls: " + str(n), curtainWalls]


Hope you get good use of it!

One thought on “Disallow Joins on Curtain Walls with Dynamo

  1. Pingback: Show/Hide Curtain Wall in V/G - engipedia

Leave a Reply

Your email address will not be published. Required fields are marked *