# GetVisibility as Boolean for a View

**URL:** <https://forum.dynamobim.com/t/getvisibility-as-boolean-for-a-view/42106>\
**Category:** Revit\
**Tags:** archi-lab, python\
**Created:** [October 21, 2019, 10:48am UTC](https://forum.dynamobim.com/t/getvisibility-as-boolean-for-a-view/42106 "2019-10-21T10:48:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![RedRai](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RedRai](https://forum.dynamobim.com/u/RedRai)\
**Post date:** [October 21, 2019, 10:48am UTC](https://forum.dynamobim.com/t/getvisibility-as-boolean-for-a-view/42106/1 "2019-10-21T10:48:37Z")

</div>

Hi guys,

I need help with a filter script that Im doing right now.  
There is one node missing and I dont know how to do it.  
A list of booleans (True/False) is necessary so I can split my filters from the ones which are visible in my view and the ones that arent visible.  
I found something on the Revit API but dont know how to make that to a python script. (Still trying to learn that)  
[https://www.revitapidocs.com/2015/2f6634a9-b590-7674-e3cf-e5364eabdaf8.htm](https://www.revitapidocs.com/2015/2f6634a9-b590-7674-e3cf-e5364eabdaf8.htm)

```auto
Public Function GetVisibility ( _
	category As Category _
) As Boolean

```

Any idea?

---

<div class="post-metadata">

**Author:** ![RedRai](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RedRai](https://forum.dynamobim.com/u/RedRai)\
**Post date:** [October 21, 2019, 3:03pm UTC](https://forum.dynamobim.com/t/getvisibility-as-boolean-for-a-view/42106/2 "2019-10-21T15:03:16Z")

</div>

in other words:

How to access the filter visibility and get a List of True/False values from it.

 ![Filter](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/1/b/1b965719bb1fc15596bfc53c32758db338e53ecc.png)

---

<div class="post-metadata">

**Author:** ![cgartland](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/cgartland/32/45378_2.png) [@cgartland](https://forum.dynamobim.com/u/cgartland)\
**Post date:** [October 21, 2019, 4:38pm UTC](https://forum.dynamobim.com/t/getvisibility-as-boolean-for-a-view/42106/3 "2019-10-21T16:38:00Z")

</div>

You can either use a node from the Rhythm package or write a short Python script like this:

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/4/2/42a580cc06acab43777964863ee3e98dc4bc86f5.png)

```
view = UnwrapElement(IN[0])
pfes = UnwrapElement(IN[1])

OUT = [view.GetFilterVisibility(pfe.Id) for pfe in pfes]
```

---

<div class="post-metadata">

**Author:** ![RedRai](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@RedRai](https://forum.dynamobim.com/u/RedRai)\
**Post date:** [October 21, 2019, 5:02pm UTC](https://forum.dynamobim.com/t/getvisibility-as-boolean-for-a-view/42106/4 "2019-10-21T17:02:35Z")

</div>

Didn’t know it can be so easy 😃  
Thank you so much!!
