Message 1 of 7
Not applicable
10-15-2020
08:25 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I'm trying to get members of a group of a linked document. The group only has 4 elements which are walls or ceilings etc. However, the elements returned by GetMemberIds() are too many... It returns around 150 elements for one group... Elements are mostly Sketch, ModelLine, DatumPlane, or AnalyticalModelSurface. I only want to get real elements from the group to avoid over looping through the elements.
What am I missing? Why GetMemberIds() method returns that many elements?
filter = new ElementCategoryFilter(BuiltInCategory.OST_IOSModelGroups);
DocumentSet linkedDocs = commandData.Application.Application.Documents;
foreach (Document linkedDoc in linkedDocs)
{
collector = new FilteredElementCollector(linkedDoc);
groups = collector.WherePasses(filter).WhereElementIsNotElementType();
List<ElementId> memberIds = group.GetMemberIds().ToList();
...
....
.....
}
Solved! Go to Solution.