Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
public static List<Element> RoomsInView(DocumentSet docs, View view) { List<Element> riv = new List<Element>(); foreach (Document dc in docs) { FilteredElementCollector viewElementCollector = new FilteredElementCollector(dc, view.Id); ElementCategoryFilter roomFilter = new ElementCategoryFilter(BuiltInCategory.OST_Rooms); viewElementCollector.WhereElementIsNotElementType(); viewElementCollector.WherePasses(roomFilter); riv.AddRange(viewElementCollector.ToElements()); } return riv; }
The code above doesn't work because the FilteredElementCollector(doc, viewId) expects the viewId to be from the same document I guess?
Is there a way to collect rooms in Linked Documents that are visible in a view that belongs to the current document? Any workaround?
Thanks..
Solved! Go to Solution.