Disallow Joins on Revit® Beams with Dynamo
Disallowing joins on Beam (Structural Framing elements) 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® Structural Framing automatically is easily achievable.
In Dynamo file there are two options (just connect appropriate lacing), disallow only selected elements, or disallow all Beam elements (instances) in the project model (as shown with orange line on the picture below).
Python node looks like this (see comments inside the code):
#### General imports #####
import clr
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import *
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
#### End of General imports #####
# Unwrap inputs
input = UnwrapElement( IN[0] )
elements = []
#force input into list
try:
for e in input:
if e.Category.Name == "Structural Framing":
elements.append(e)
except:
if input.Category.Name == "Structural Framing":
elements.append(input)
# Start Transaction
doc = DocumentManager.Instance.CurrentDBDocument
TransactionManager.Instance.EnsureInTransaction(doc)
for e in elements:
Autodesk.Revit.DB.Structure.StructuralFramingUtils.DisallowJoinAtEnd(e, 0)
Autodesk.Revit.DB.Structure.StructuralFramingUtils.DisallowJoinAtEnd(e, 1)
# End Transaction
TransactionManager.Instance.TransactionTaskDone()
# Wrap
OUT = elements
DOWNLOAD THE SCRIPT
Hope you get good use of it!
Nice to meet you
I am Japanese.
I referred to your script.
I learned a lot.
When I ran the script,
The “permit” junction was not “prohibited”.
It was still “permitted”. It didn’t change.
Why?
We would appreciate your feedback.
I’m sorry but,
I want you to help
Hi, thanks for the feedback. The script has two options: either it disallow joins on all beams (Structural Framing instances), or only on selected ones. As you can see on the image above, dotted orange line shows what needs to be connected to activate the other option.
Maybe you did not select any Structural Framing elements? Try switching to “All Elements of Category” and then run the script.
What Dynamo version do you use?
thank you for your reply.
It was solved safely.
The cause was the difference between English and Japanese.
The category name “Structural Frame”
When I changed it to Japanese, it worked normally.
(Because it is Revit.ver in Japanese, this may have happened)
Dynamo is ver1.3.3.
This time, I learned about Dynamo for the first time and used it.
Your idea is great. I was very surprised to be able to do this. I was in trouble, so I was saved.
I will do my best so that I can continue to use Dynamo.
Thanks to you, I learned a lot.
Thank you so much for your great idea!
No problem, glad you solved it and find it useful!
Thank you so much. You saved my time.
No problem, glad you found it useful!
Simple and elegant. Thank you Mirko!
Thanks Boris, no problem, glad you found it useful!
Very Useful. Nice Script. Helps in current project
Thank you Vivek, nice to hear that!