Message 1 of 6
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
Apologies for what must be a basic question... As part of a larger script, when the user selects a single linked wall, I would like to return all the linked walls in the active view. Unfortunately, instead, all the walls in the current document active view are returned!
Any advice greatly appreciated 🙂
Mark
obt = ObjectType.LinkedElement
refElemsLinked = uidoc.Selection.PickObjects(obt, "Please pick an element in the linked model")
linkInst = doc.GetElement(refElemsLinked[0].ElementId)
transform = linkInst.GetTotalTransform()
elem = doc.GetElement(refElemsLinked[0].ElementId)
docLinked = elem.GetLinkDocument()
fec=ElementCategoryFilter(BuiltInCategory.OST_Walls)
collectedWalls = FilteredElementCollector(docLinked,doc.ActiveView.Id).WherePasses(fec).WhereElementIsNotElementType().ToElements()
Solved! Go to Solution.