Is there any SwitchJoinOrder NODE available?
hotgear package is very good with join & unjoin geometry.
Is there any SwitchJoinOrder NODE available?
hotgear package is very good with join & unjoin geometry.
You might have to dig into Revit API. There is a method in Revit API called “SwitchJoinOrder”. You can try writing Python and let us know if you find any errors. http://www.revitapidocs.com/2017.1/854c88ca-9bed-7997-3326-dcc53c6335c0.htm
Here is an example that works with floors and columns:
Floor.SwitchJoinOrderCutWithColumn.dyn (2.7 KB)
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
from Autodesk.Revit.DB.Structure import *
clr.AddReference('RevitAPIUI')
from Autodesk.Revit.UI import *
clr.AddReference('System')
from System.Collections.Generic import List
clr.AddReference('RevitNodes')
import Revit
clr.ImportExtensions(Revit.GeometryConversion)
clr.ImportExtensions(Revit.Elements)
clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
uidoc=DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
#Get selected floors or ask user to pick:
selectedIds = uidoc.Selection.GetElementIds()
if selectedIds:
ids = selectedIds
else:
refArray = uidoc.Selection.PickObjects(Selection.ObjectType.Element,"Pick floor(s)")
ids = [ref.ElementId for ref in refArray]
for id in ids:
floor = doc.GetElement(id)
bb = floor.get_BoundingBox(doc.ActiveView)
outline = Outline(bb.Min, bb.Max)
filter = BoundingBoxIntersectsFilter(outline)
columns = FilteredElementCollector(doc, doc.ActiveView.Id).OfCategory(BuiltInCategory.OST_StructuralColumns).WherePasses(filter)
count = 0
#Do some action in a Transaction
TransactionManager.Instance.EnsureInTransaction(doc)
for column in columns:
areJoined = JoinGeometryUtils.AreElementsJoined(doc,floor,column)
if areJoined:
columnIsCut = JoinGeometryUtils.IsCuttingElementInJoin(doc,floor,column)
if columnIsCut:
JoinGeometryUtils.SwitchJoinOrder(doc,floor,column)
count = count + 1
TransactionManager.Instance.TransactionTaskDone()
OUT = str(count) + ' join orders are changed.'
many thanks @Einar_Raknes its working like a charm
i am using revit 2016 dynamo 1.2.
its works gr8.
thanks again.
What a great job! Thank you very much!
Is there something similar for beams?
floors and beams?
Exactly.
@teixeiranh
It might be as simple as replacing OST_StructuralColumns
with OST_StructuralFraming
in this line:
columns = FilteredElementCollector(doc, doc.ActiveView.Id).OfCategory(BuiltInCategory.OST_StructuralColumns).WherePasses(filter)
Thank you very much for the precise information. God bless you!
Hi,
@Einar_Raknes. How should the script be wirtten, if i dont want to choose the floors, but automatic want to change the cutting order. Or, to step up the game, i want a special cutting order for florrs, collumns AND walls? I tried it with the suggestions for this topic: Auto join Elements but i am deadlocked and dont know where to go on.
Regards,
Ammo
Unfortunately I don’t have any spare time left to help you with this. Hope you can figure it out!
How can i do this with floor and floor?
Hi!
My case:
I am modelng with steel columns inside concrete columns, steel beams inside concrete beams. How to determine join order for objects of the same category.
Or another way: selected objects cut other objects (Optional to add same category or not). Thank for any help