Node limit system Element.GetJoinedElements

Hello, Natively I thought that the walls are joined since we can disjoin them with this
image

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

Revit BoilerPlate Code +

#######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}

Cordially
christian.stan

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?


Script: Forum english 09 aout 2023.dyn (43.9 KB)

thanks in advance
Cordially
christian.stan

@christian.stan ,

maybe you can link it with this topic

are the desired walls at the same level without offset ?

KR

Andreas

1 Like

Yes at the same level without lag (I stay in a “classic” frame at first)
Cordially
christian.stan

Hello, I found a better solution.
I share this one.


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])

Have a good evening
cordially
christian.stan