How to choose the hidden and visible elements

how to select all hidden or visible elements from a list elements using Python

Hi @til.shviger could you share what you have tried so far in Dynamo/Python? :slight_smile: The IsHidden Method could be of use, this is an older post but should help: Hidden elements in a view

1 Like

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)

I believe that if you toggle “Show Hidden Elements” and run your code it will output all elements including hidden ones. You can add to your code after collecting your elements a part that separates your hidden elements and visible elements using the IsHidden property. In the link I posted above there is a code that shows how to use the IsHidden property, and there is a package called Element.IsHidden with a custom node (it is a bit old so I am not 100% sure it is still functional but it should be) You can look at the code inside that node to see how the hidden and visible elements are separated into two lists. Hope this helps!

1 Like