All Elements In Active View - visible only?

The “All Elements In Active View” seems to return any element that’ is in the View Range of the current Active View - whether you can see it or not.
Is there any way to return only Elements that are actually Visible in this View?
I other words, filter out anything that’s hidden behind other elements.
Specifically, I want to grab all of, say the Windows in a Elevation - but not the Windows that are on the back side of the building.
Revit must be capable of this internally, since the “Tag All Not Tagged” only tags the visible elements & not the hidden ones.
But can Dynamo do something similar?

Tag All Not Tagged will tag any element in the view. Not just ones that aren’t “hidden” by other elements. I don’t think there’s a way to only select “visible” elements. At least, not an efficient way.

Sorry, but I disagree.
Go into an Exterior Elevation.
Turn on the Furniture category if it’s off.
TANT Furniture. You will probably not see any Tags.
Now drag a selection window across the entire View.
Look at the Filter list and you will see many Furniture elements selected.
You will also NOT see any Furniture Tags in the filter list.

Maybe Furniture elements work differently, but all my Plumbing Fixtures are being tagged with Tag All.

OK, if you don’t believe me about Furniture, here’s my Filter list after I just did a TANT for Walls.
TANT%20Walls

Yup, I’m able to recreate the tagging issue with Walls. Interesting.
It looks like TANT handles certain categories differently. Walls had to be at least partially visible, but Plumbing Fixtures did not.

That is weird.
I tried with Plumbing Fixtures and got 47 Tags, but only 33 Fixtures.
Huh?
Anyway, back to the original idea.
I want to be able to do in Dynamo what the Tag All Not Tagged tool does with Walls.

I teach a Revit class and I alway have to warn my students about selecting elements in Elevations, because it’s way too easy the select things you can’t see,

In lieu of trawling the API, here is possible work around for windows only.

  1. Get the view plane and perpendicular vector.
  2. Get the geometry centroid of each window in the view.
  3. Project the centroid onto the view plane in the perpendicular vector.
  4. Determine if the geometry intersects any other elements when projected.
  5. Filter out those elements as they will be behind others.
  6. Tag only the non-filtered windows.
1 Like

One idea to filter a bit quicker than that method (geometry calculations are slow), and should produce reasonable results.

1)Get the distance from the view plane and filter out elements beyond your distance of concern - say 1/2 of the total view depth.

  1. Take the filtered list and filter out windows where the angle from the facing orientation and the view plane’s normal (maybe inverted?) is more than say 60 degrees (or whatever looks good). This will filter out windows which are too oblique to adequately document in this view and all windows facing away (meaning in a wall facing the other or in a wall perpendicularish to the view).

  2. Lastly, ensure the hosting wall type is classified as exterior and family types which are intended for interior use. This will filter out interior glazing and exterior windows inside the building (not judging on costs or aesthetics but a hope that only one of those two filters is required).

1 Like