I would like to know if there is an node that allow me to know if I element is joined or not with True/False values.
I found a node from rhythm package but I just need to know if the elements are “joined” or not.
import clr
clr.AddReference("RevitServices")
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
clr.AddReference("RevitAPI")
from Autodesk.Revit.DB import *
elements_list1, elements_list2 = UnwrapElement(IN)
result = []
TransactionManager.Instance.EnsureInTransaction(doc)
for i in elements_list1:
for y in elements_list2:
if not JoinGeometryUtils.AreElementsJoined(doc,i,y):
result.append(False)
else:
result.append(True)
TransactionManager.Instance.TransactionTaskDone()
OUT = result
Hello @Kulkul ,
Thanks for the answer.
I am looking for a method that tells me only if the element is attached or not without the need to compare it with a second element. This would speed up the search.
Is this possible?
I tried an alternative with the rhythm node but I don’t know how to treat the “null” values in the python script. I have tried “isNull” but without success. I don’t have much knowledge in programming so I guess I’m doing something that might be aberrant.
TransactionManager.Instance.EnsureInTransaction(doc)
for i in elements_list1:
for y in elements_list2:
if isNull:
result.append(False)
else:
if not JoinGeometryUtils.AreElementsJoined(doc,i,y):
result.append(False)
else:
result.append(True)
TransactionManager.Instance.TransactionTaskDone()
OUT = result