Auto Join Walls and Columns

Hi Viraj,

There is a package called ‘Hot Gear’ Package. It has got some awesome custom nodes that fulfill what your looking for. Good Luck!

3 Likes

Hi Kulkul,

Thanks a lot for bringing the Hot Gear package to my notice. The nodes in that work like a charm for the stuff I was trying to accomplish. It didn’t have a Switch Join node but with some minor tweaking I could build my own.

i need help please

i follow these steps exactly but i got this error ??

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
Traceback (most recent call last):
File “<string>”, line 15, in <module>
NameError: name ‘Revit’ is not defined

Untitled

Mohamed-

See image below (snapped from the first post in this thread). Change “Autodesk” to “Revit” in Line 14. Also, note that your inputs are likely lists (all walls and all columns) unless you only have one wall and one column i your project, so you should read farther down in this thread and implement some of the loops that will allow you to run the joins between all walls and all columns.

Hope this helps.

Python Reference Error

1 Like

Thanks to all contributors for their efforts. I built on what was discussed here to come up with my own way of simultaneously joining walls, floors and ceilings, and switching join order by re -running. It is not quite there yet but already pretty handy.

Hi Ben!

I did the script you gave and realized that It worked very well. But the matter is all walls joined with all colums regarless they didn’t intersect.

So i got the warnings from Revit like a attached picture.

Can you help me to deal with this problem?

Thanks!

Joining all walls to all columns is obviously not a good idea…You need to first apply some logic to determine what “should” be joined. Depending on what you are trying to do there is a lot of ways to do this. One way would be to first take the columns and walls and do a element.geometry to get the solids in Dynamo, then do a Geometry.Does Intersect. If it so found that the geometries do intersect, then you should try to join them.

I use this script a bit differently. I first test to see if the elements are joined, then use logic to determine if they should be joined and what order they should be joined in (should CMU wall be joined to Concrete column or concrete column be joined to CMU wall).

Thanks Ben for your support!

After using element.geometry and Geometry.Does intersect, i used list.Map to collect the boolean list. The value was True when a column intersected with a wall.

I used the list to set intersection - condition. I want these python script will just join walls and columns when they intersect each other.

But the condition did not work. I knew that because i used variable inter_Count like and got unexpected output. The )utput should be five, not one.

Can you see the attached picture and help me to deal with this problem?

Thank you very much!

Try hashing out line 35 and 36. See if the inter_Count changes.

Also try putting the try/except both inside the “if” clause and putting the inter_Count outside the “try” but inside the “if”.

 

I have found what was problem here.

I coded again like the attached file and it worked.

But do you have others simple way to this? My script is really long and confused.

Thanks!

 

 

 

 

 

 

 

 

 

 

 

 

Hi guys, i´ve tried to mimmic the script but somehow it isnt working.

I am trying to join walls and floors.

 

Can anyone shed a light?

 

Thanks!

Akanoe-

Can you give us (the Dynamo Community) more to work with? Perhaps a picture of your script showing the error? Or upload the script and an example file? By simply saying “it doesn’t work” we don’t know if perhaps it is an error with the python script, or with something else entirely within your Dynamo script, or perhaps in your Revit file.

Note that the script you have written only works on elements not joined together. If the elements are already joined, but in the wrong order, you will need to use SwitchJoinOrder.

 

 

Hello Guys,
I am running with the same problem as Akanoe_Martins_Ferre. I tried replication the scrip and I get a warning :

Warning: IronPythonEvaluator.EvaluateIronPythonScript operation failed.
unexpected token ‘’

How can I resolve this?

Thank you.

in the python code you need to add colon after each for loop, check picture below.

Thank you Mohammad,
I added the " :" and it now works with no warnings on dynamo, but I get a lot of warnings in Revit.
Warning:
“Highlighted elements are joined but do not intersect.”
How can I now edit the script so that all elements that don’t have intersection with one another will get unjoin?
The problem that script is joining for example parallel walls - so they don’t intersect, but are join.
Please help with this issue. Thank you for your response.

Here is the script I have now:



Thank you

Hi

There are two ways to do that as I know:

1- To use geometry.Doesintersect node as picture below.

but just to worn you this way may take a lot of running time if model is heavy, because you are reading all the element in the model. To solve it, you can decrease the spending time on that by adding filter rule like elements per floor.

2- To use interference check inside Revit and based on the clash report your dynamo will join the only elements that cause clashes, and this way recommended for heavy model and more accurate. if you need help with this way I can help you.

Regards

has anyone solved the issue making your revit file really slow after using the script?

import clr
clr.AddReference(‘ProtoGeometry’)
from Autodesk.DesignScript.Geometry import *

clr.AddReference(“RevitAPI”)
import Autodesk

clr.AddReference(“RevitServices”)
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

clr.AddReference(“RevitNodes”)
import Revit
clr.ImportExtensions(Revit.Elements)
#The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN

elementA = UnwrapElement(IN[0])
elementB = UnwrapElement(IN[1])

doc = DocumentManager.Instance.CurrentDBDocument

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

for A in elementA:
for B in elementB:
try:
result = Autodesk.Revit.DB.JoinGeometryUtils.JoinGeometry(doc,A,B)
result.append(result)
except:
pass
TransactionManager.Instance.TransactionTaskDone()
#Assign your output to the OUT variable.
OUT = results

Hi Ben,

Heartfully, You are really Gr8 to helping us. I have done the script & i’ve saved lot of time. the worry is i need to join the Walls & Structural Columns(Linked Model).

I’ve tried Several methods, Could you please assist me on this.

Thanks in Advance.

Linked Models in Revit are static - you cannot modify a linked model from the host model. If you want to join walls and columns in the linked model, you must close your host model, then open the linked model as the primary document. If you are wanting to join your columns to walls in a linked model, I don’t believe that will be possible either for the same reason - the joining does change the behavior and appearance of both joined elements, and you cannot make any changes to the linked model via the host. This is not a Dynamo issue - that’s just how Revit works

Thank you So much Ben,

Even i’ve thought the same, but there is a program "Structural Framing Opening for Ductswork - link.dyn. Actually
the duct which is in local model it’s cutting the linked model(Structural). A small hope If it works, this would be also works fine. Many times i’ve tried to edit the script by understanding from online sources. Failed everytime. Anyhow thanks for the reply on above post.

& Now my Queries are

  1. As mentioned above. I’m an Electrical Guy. I’ve downloaded a Zip which consists all the

Structural Framing Opening for Ductswork - link.dyn (27.1 KB)

but i’ve missed the main script which cuts the Walls(linked model) with Cable Trays(Local Model).
Hope you understand my question. Could you please send me the script which cuts the walls are in linked model.

  1. Even in the local model it cuts the wall even if a Cable tray fitting cuts the wall

Plan View (Clashes are in Red)

Openings at incorrect place(Actually it should not create a Opening) & My question is can we give any instruction in script which cuts the wall only when the trays are running in 90degrees.??

Hope you will be reply to this post too.
Thanks in Advance.
Regards
image

1 Like