# Hidden elements in a view

**URL:** <https://forum.dynamobim.com/t/hidden-elements-in-a-view/869>\
**Category:** Packages\
**Created:** [December 31, 2014, 1:03pm UTC](https://forum.dynamobim.com/t/hidden-elements-in-a-view/869 "2014-12-31T13:03:25Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adrian\_Crisan](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@Adrian\_Crisan](https://forum.dynamobim.com/u/Adrian_Crisan)\
**Post date:** [December 31, 2014, 1:03pm UTC](https://forum.dynamobim.com/t/hidden-elements-in-a-view/869/1 "2014-12-31T13:03:25Z")

</div>

When I list (using “Watch”) all elements in active view, obvious, the hidden elements are not listed. Is there a way to list the ones that are hidden? Like I’m passing “All Elements In Active View” through a boolean “false” statement to get the the list of ones that are hidden.

Thanks for help/suggestions.

---

<div class="post-metadata">

**Author:** ![jostein\_olsen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jostein_olsen/32/8570_2.png) [@jostein\_olsen](https://forum.dynamobim.com/u/jostein_olsen)\
**Post date:** [January 5, 2015, 3:45pm UTC](https://forum.dynamobim.com/t/hidden-elements-in-a-view/869/2 "2015-01-05T15:45:13Z")

</div>

If you turn on show hidden elements before you run the “All elements In Active View”-node, they will be included in your list. A bit cumbersome but I don’t know any other way.

Here is a python script for separating the hidden/not hidden ones. I’ve also released a package called Element.IsHidden where the elements are sorted in hidden and not hidden.

![17](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/2X/8/8a2dc5e7f08fa21a8a6de8640b21550344206b06.png)

---

<div class="post-metadata">

**Author:** ![Andreas\_Dieckmann](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/andreas_dieckmann/32/365_2.png) [@Andreas\_Dieckmann](https://forum.dynamobim.com/u/Andreas_Dieckmann)\
**Post date:** [January 6, 2015, 5:44am UTC](https://forum.dynamobim.com/t/hidden-elements-in-a-view/869/3 "2015-01-06T05:44:07Z")

</div>

Note that unfortunately there are a number of other ways of hiding elements that will not get picked up by the IsVisible method, e.g. element is in a hidden (sub-)category, element is hidden through use of a view filter, element is part of an invisible workset, element is outside of crop box scope etc.

---

<div class="post-metadata">

**Author:** ![jostein\_olsen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jostein_olsen/32/8570_2.png) [@jostein\_olsen](https://forum.dynamobim.com/u/jostein_olsen)\
**Post date:** [January 6, 2015, 7:24am UTC](https://forum.dynamobim.com/t/hidden-elements-in-a-view/869/4 "2015-01-06T07:24:25Z")

</div>

Yes, I found out after i posted… Couldn’t find any thing in the API for “extracting” hidden categories though? Have you?

Not that it has anything to do with Adrian’s question, but I think the node can serve some purpose in larger projects where users have manually hidden singular objects in some views. (Just a problem that emerges now and then)

---

<div class="post-metadata">

**Author:** ![Andreas\_Dieckmann](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/andreas_dieckmann/32/365_2.png) [@Andreas\_Dieckmann](https://forum.dynamobim.com/u/Andreas_Dieckmann)\
**Post date:** [January 6, 2015, 8:45am UTC](https://forum.dynamobim.com/t/hidden-elements-in-a-view/869/5 "2015-01-06T08:45:33Z")

</div>

Definitely a useful node for model review.

If you want to query the visibility of a given category, you can use Category.Visible …

---

<div class="post-metadata">

**Author:** ![Adrian\_Crisan](https://avatars.discourse-cdn.com/v4/letter/a/cdc98d/32.png) [@Adrian\_Crisan](https://forum.dynamobim.com/u/Adrian_Crisan)\
**Post date:** [January 6, 2015, 9:32am UTC](https://forum.dynamobim.com/t/hidden-elements-in-a-view/869/6 "2015-01-06T09:32:48Z")

</div>

Joisten/Andreas - thanks for your posts and suggestions.

&nbsp;

Yes, this is for model review and management of large projects.

&nbsp;

At this moment I’m working on something like this:

&nbsp;

1. get a list of all views that are to be audited

2. select individual views or all

3. (temporary) duplicate these views

4. show all elements in these views

5. create a list with all elements.

6. store that info.

7. delete duplicated views

8. get a list of visible elements in initial views that were to be audited.

9. compare the two lists (for a view) and print out elements that are not visible.

&nbsp;

At least this is the initial “sketch”, but most likely I’ll adapt it and change it as I work on.

As usual better solutions are coming into my head after I finish a task.

&nbsp;

Thanks for help and suggestions.

I’ll post things as I progress.

&nbsp;

---

<div class="post-metadata">

**Author:** ![Andreas\_Dieckmann](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/andreas_dieckmann/32/365_2.png) [@Andreas\_Dieckmann](https://forum.dynamobim.com/u/Andreas_Dieckmann)\
**Post date:** [January 6, 2015, 10:46am UTC](https://forum.dynamobim.com/t/hidden-elements-in-a-view/869/7 "2015-01-06T10:46:39Z")

</div>

Adrian: That seems like a sound approach. Altermatively, you could toggle the view to display hidden elements (as Jostein suggested) - I think this might actually be possible using the Revit API (not sure, though).

Jostein: I just remembered I actually made a custom node called View.CategoryIsVisible a year ago that is included in package Clockwork to query the category visibility.

---

<div class="post-metadata">

**Author:** ![Uaifestival](https://avatars.discourse-cdn.com/v4/letter/u/47e85d/32.png) [@Uaifestival](https://forum.dynamobim.com/u/Uaifestival)\
**Post date:** [May 1, 2015, 1:12am UTC](https://forum.dynamobim.com/t/hidden-elements-in-a-view/869/8 "2015-05-01T01:12:30Z")

</div>

I have just resolved the first step of my [process](http://dynamobim.com/forums/topic/2000-3dviews-in-a-shot/) and I am looking way to improve it.

Perspective views are created with element select, now I should turn on the hidden ones before putting those on sheet.

This passage

1. show all elements in these views

could be done within Dynamo or you have pass through the Revit tools?

Other better solutions came to your head?

Second, I have not find the way to apply a template to the perspectives I am to create…maybe there is something in some personal packages, or deep in the archive (Yes in Revit it is quick and easy, but I would prefer to get them done, before handling Revit tools).

---

<div class="post-metadata">

**Author:** ![simon\_murphy1](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/simon_murphy1/32/101536_2.png) [@simon\_murphy1](https://forum.dynamobim.com/u/simon_murphy1)\
**Post date:** [December 2, 2017, 8:42pm UTC](https://forum.dynamobim.com/t/hidden-elements-in-a-view/869/9 "2017-12-02T20:42:50Z")

</div>

Hi All,

I am trying to get a count of all the hidden elements in all views I have attempted to alter the python script of Jostein’s custom node but it doesn’t seem to be working for me. Can anyone help.

[Hidden Elements - Test.dyn](https://forum.dynamobim.com/uploads/short-url/it5LXrIY26nJJWrcSXVc0TGMFnr.dyn) (4.0 KB)  
indent preformatted text by 4 spaces

```
import clr

```

clr.AddReference(‘RevitAPI’)  
from Autodesk.Revit.DB import \*

clr.AddReference(“RevitNodes”)  
import Revit  
clr.ImportExtensions(Revit.Elements)

clr.AddReference(“RevitServices”)  
import RevitServices  
from RevitServices.Persistence import DocumentManager

elements = UnwrapElement(IN[0])  
views = UnwrapElement(IN[1])  
listen=

for element in elements:  
for view in views:  
listen.append(element.IsHidden(view))

OUT = listen

---

<div class="post-metadata">

**Author:** ![Joaquim\_Agostinho1](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@Joaquim\_Agostinho1](https://forum.dynamobim.com/u/Joaquim_Agostinho1)\
**Post date:** [February 6, 2018, 5:20pm UTC](https://forum.dynamobim.com/t/hidden-elements-in-a-view/869/10 "2018-02-06T17:20:41Z")

</div>

Hi @jostein_olsen,

Thank you for publishing the Element.IsHidden packaged.

It seems that it is only picking up the hidden elements for the Active View. Is this correct?

Thank you  
Joaquim

---

<div class="post-metadata">

**Author:** ![saju\_autodesk](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/saju_autodesk/32/61838_2.png) [@saju\_autodesk](https://forum.dynamobim.com/u/saju_autodesk)\
**Post date:** [May 14, 2018, 9:32am UTC](https://forum.dynamobim.com/t/hidden-elements-in-a-view/869/11 "2018-05-14T09:32:25Z")

</div>

Does this work for hidden linked elements?

---

<div class="post-metadata">

**Author:** ![David\_Scheer](https://avatars.discourse-cdn.com/v4/letter/d/8797f3/32.png) [@David\_Scheer](https://forum.dynamobim.com/u/David_Scheer)\
**Post date:** [May 25, 2019, 4:05am UTC](https://forum.dynamobim.com/t/hidden-elements-in-a-view/869/12 "2019-05-25T04:05:03Z")

</div>

There are a few tricks here to catch hidden elements universally, but none of them catch everything except the CustomExporter method. [https://thebuildingcoder.typepad.com/blog/2013/08/determining-absolutely-all-visible-elements.html](https://thebuildingcoder.typepad.com/blog/2013/08/determining-absolutely-all-visible-elements.html).

Some tricks:  
element.IsHidden catches things hidden by category, by element and even for Rooms and elements not able to be shown due to Phase settings of a view, but it does NOT catch elements that are not visible in a view due to Design Option settings.

element.get\_boundingbox(view) is another good universal catch, but it’s a slow operation, and it also doesn’t catch elements that are not visible by design option settings.

element.IsHidden also doesn’t catch elements in linked models that are not visible due to the WorkSet not visible. Check Workset.IsVisible() for this.

My main issue now is that nothing I can find catches if an element is not visible due to Design Option settings, and the Design Option settings for a View are not accessible as far as I can find for a View with RevitAPI. Kind of screwed here unless using CustomExporter. What I want to know is what CustomExporter does that catches everything in the View, and why don’t we have access to all of these methods with RevitAPI?

---

<div class="post-metadata">

**Author:** ![l8j9h](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@l8j9h](https://forum.dynamobim.com/u/l8j9h)\
**Post date:** [November 3, 2021, 3:23pm UTC](https://forum.dynamobim.com/t/hidden-elements-in-a-view/869/13 "2021-11-03T15:23:34Z")

</div>

Hi All,

This video show how to get hidden elements in Active View

[Revit Dynamo - Get Hidden Elements in Active View](https://www.youtube.com/watch?v=WjJXpAJhdS8)
