Hello, Natively I thought that the walls are joined since we can disjoin them with this
I admit I don’t understand even if the Node and the API return the same response (are not joined or attached)
Is there a limitation to only retrieve categories different from the original element
You would have an answer
Thanks in advance
#######OK NOW YOU CAN CODE########
elt1=UnwrapElement(IN[0])
elt2=UnwrapElement(IN[1])
answer_bool=JoinGeometryUtils.AreElementsJoined(doc,elt1,elt2)
lst=JoinGeometryUtils.GetJoinedElements(doc,elt1)
answer_bool2=JoinGeometryUtils.AreElementsJoined(doc,doc.GetElement(lst[0]),elt1)
OUT = {"Two Walls are Joined--> ":answer_bool,"Elements are joined with him--> ":[i.IntegerValue for i in lst],"WallIN[0] - floor joined--> ":answer_bool2}
Hello, in the statement of my problem I said a little stupidity with Detach the geometry between walls.
In fact the search is more, I select a wall, I want to know the walls touching it at the same level (I don’t know if such a node exists in custom)
here are 2 solutions (With location curve, with boundingbox interceptions) to do it, are there others?
For walls on the same floor
(walls in contact arranged by dissociated wall)
import sys
import clr
clr.AddReference("RevitAPI")
import Autodesk
from Autodesk.Revit.DB import Curve,IntersectionResultArray
elt1=UnwrapElement(IN[0])
elt2=UnwrapElement(IN[1])
def Inter(el1,el2):
a=el1.Location.Curve
b=el2.Location.Curve
c=IntersectionResultArray()
d=a.Intersect(b,c)
if d[1] == None:
pass
else:
return el1
stock=[[Inter(j,i) for j in elt1 ] for i in elt2]
stock2=[]
stock3=[]
for i in range(len(stock)):
for idx,j in enumerate(stock[i]):
if j!=None:
stock3.append(j)
stock2.append(stock3)
stock3=[]
OUT = zip(*[elt1,stock2])