How to apply element tag to elevation using revit api?

How to apply element tag to elevation using revit api?

waleed.hany
Contributor Contributor
518 Views
1 Reply
Message 1 of 2

How to apply element tag to elevation using revit api?

waleed.hany
Contributor
Contributor

I am trying to tag elements ex.doors in elevation using revit api, first I list all elements in view, then use IndependentTag.Create method to add tags.
However tags of hidden elements also appear in elevation (since an elevation contains all elements in 3d view unlike plans)

waleedhany_0-1633389417648.png

On the otherhand, if select on all elements of the view and manually use tag All from ui

waleedhany_1-1633389529830.png

tags apears on the elements visible in view only (whick is the desired effect)

waleedhany_2-1633389611230.png

How can this result be achived using revit api? 
How to tag only elements visible in view/ how to not tag elements that are not shown in view?
Can tags be hidden (all elements are tagged but tags that are not projected directly are hidden)?





0 Likes
519 Views
1 Reply
Reply (1)
Message 2 of 2

danielpinheiro860
Contributor
Contributor

I guess you just need to filter the elements that are visible in this view before tag them. You can use this approach for this: https://thebuildingcoder.typepad.com/blog/2017/05/retrieving-elements-visible-in-view.html

0 Likes