Hey people ! It’s good to be back to the forums !
I have an issue with linked elements i’m using a user interface with datashapes i have managed to select the linked element i want to use but i can’t seem to get its faces i’ve tried to get the geometry too but i keep getting the same error message ! Any help would be appreciated !
workaround are bimorphnodes
# links
linked_docs = FilteredElementCollector(doc).OfCategory(BuiltInCategory.OST_RvtLinks).WhereElementIsNotElementType().ToElements()
# linked file
link_document = []
for link in linked_docs:
link_doc = link.GetLinkDocument()
link_document.append(link_doc)
link = link_document[0]
# walls
linked_walls = FilteredElementCollector(link).OfCategory(BuiltInCategory.OST_Walls).WhereElementIsNotElementType().ToElements()
faces_of_walls = []
for elem in linked_walls: #for every element
edges = [] #an empty list for the edges to process
processed = [] #the list of processed edges which we want to keep
geos = elem.get_Geometry(Options()) #the geometry
for geo in geos: #for every geometry found
if geo.__class__ == DB.Solid: #if the geomtry is a solid
faces = geo.Faces #get the faces
for f in faces:
faces_of_walls.append(f)
OUT = faces_of_walls
i think that code can also be a starting point. It return all faces of a wall, from walls in a linked file.
2 Likes
The Bimorph nodes worke just fine ! Thanks for your help !
1 Like