
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
I am in need of creating a filter which can satisfy both of 2 conditions below:
1. Family symbols in a certain category
2. Has instance placed in the project model
For instance: I say there are 2 family symbols (Type 1 and Type 2) in a family which belongs to Structural Columns category. Among these 2 family symbols, only Type 1 has instances placed in the project model, and Type 2 has not. And now I want to create a filter in order to filter out the Type 1 only.
I came across the below link:
http://help.autodesk.com/view/RVT/2015/ENU/?guid=GUID-A2686090-69D5-48D3-8DF9-0AC4CC4067A5
and found that it is quite easy to create the filter satisfying the 1st condition as below:
ElementCategoryFilter categoryFilter = new ElementCategoryFilter(BuiltInCategory.OST_StructuralColumns); ElementClassFilter familySymbolFilter = new ElementClassFilter(typeof(FamilySymbol)); LogicalAndFilter logicalAndFiter = new LogicalAndFilter(categoryFilter,familySymbolFilter); FilteredElementCollector collector = new FilteredElementCollector(doc).WherePasses(logicalAndFiter);
But now I am stuck on creating the filter to satisfy both of 2 conditions
Any advice on this issue?
Solved! Go to Solution.