# How to choose the hidden and visible elements

**URL:** <https://forum.dynamobim.com/t/how-to-choose-the-hidden-and-visible-elements/17368>\
**Category:** Lists-Logic\
**Tags:** python\
**Created:** [December 13, 2017, 3:05pm UTC](https://forum.dynamobim.com/t/how-to-choose-the-hidden-and-visible-elements/17368 "2017-12-13T15:05:19Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![til.shviger](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/til.shviger/32/36048_2.png) [@til.shviger](https://forum.dynamobim.com/u/til.shviger)\
**Post date:** [December 14, 2017, 5:16am UTC](https://forum.dynamobim.com/t/how-to-choose-the-hidden-and-visible-elements/17368/3 "2017-12-14T05:16:26Z")

</div>

Hi @awilliams )  
I want to get the hidden and visible elements in the active view received here (OUT list elements by @Konrad_K_Sobon code)

> [@How to select elements by multiple categories](https://forum.dynamobim.com/t/how-to-select-elements-by-multiple-categories/17341):
>
> Hello, can you help me to optimize (I need to make the code run faster) the code: (it selects all elements in the active view by several categories) import clr clr.AddReference(‘RevitAPI’) clr.AddReference(‘RevitServices’) import Autodesk,RevitServices from Autodesk.Revit.DB import \* from RevitServices.Persistence import DocumentManager doc = DocumentManager.Instance.CurrentDBDocument a=FilteredElementCollector(doc,[doc.ActiveView.Id](http://doc.ActiveView.Id)) b=FilteredElementCollector(doc,[doc.ActiveView.Id](http://doc.ActiveView.Id)) …

---

_[View the full topic](https://forum.dynamobim.com/t/how-to-choose-the-hidden-and-visible-elements/17368)._
