FilteredElementCollector of Family Instances whitout Annotations

FilteredElementCollector of Family Instances whitout Annotations

jjesusdelpino
Advocate Advocate
717 Views
2 Replies
Message 1 of 3

FilteredElementCollector of Family Instances whitout Annotations

jjesusdelpino
Advocate
Advocate

So I got: 

foreach (FamilyInstance FamIn in new FilteredElementCollector(doc).OfClass(typeof(FamilyInstance)))

 

What is the best to just retrieve the non annotation FamilyInstances? Should be an easy one but Im not getting it. Thanks.

0 Likes
Accepted solutions (1)
718 Views
2 Replies
Replies (2)
Message 2 of 3

bhprest
Advocate
Advocate
Accepted solution

The Element class has the "ViewSpecific" property, which you could use to filter your selection. ViewSpecific is true for detail items, generic annotations, and tags. 

0 Likes
Message 3 of 3

jjesusdelpino
Advocate
Advocate

Thanks, solved using this!

0 Likes