# Modify visibility of elements by assigned view..?

**URL:** <https://forum.dynamobim.com/t/modify-visibility-of-elements-by-assigned-view/104150>\
**Category:** Revit\
**Tags:** revit, python, geometry, dynamo\
**Created:** [September 6, 2024, 12:09am UTC](https://forum.dynamobim.com/t/modify-visibility-of-elements-by-assigned-view/104150 "2024-09-06T00:09:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AM3D.BIM.STUDIO](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/am3d.bim.studio/32/127441_2.png) [@AM3D.BIM.STUDIO](https://forum.dynamobim.com/u/AM3D.BIM.STUDIO)\
**Post date:** [September 6, 2024, 12:09am UTC](https://forum.dynamobim.com/t/modify-visibility-of-elements-by-assigned-view/104150/1 "2024-09-06T00:09:09Z")

</div>

Good morning.  
I am trying to look for a node that allows me to enter a list with sublists of elements, a list of views, and a visibility configuration that should be applied to the elements in the view and I have not been able to find one, any recommendations, I only found the node " Element.OverrideInView" what happens is that it doesn’t have the input for views… Help… thanks…

 ![vverror](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/c/4/c441dca051ec649541da85dacf60c93f1033101a.png)  
ESTRUCTURE INPUTS  
 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/7/8777f35c95f88ab4e49d1c4a10d5561de9f678ad.png)  
Code in Python example …?

```auto
import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *

clr.AddReference('RevitServices')
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager

doc = DocumentManager.Instance.CurrentDBDocument

elements = UnwrapElement(IN[0])
views = UnwrapElement(IN[1]) 
overrides = UnwrapElement(IN[2])

if not isinstance(elements, list):
    elements = [elements]
if not isinstance(views, list):
    views = [views]

TransactionManager.Instance.EnsureInTransaction(doc)

for element in elements:
    if hasattr(element, 'Id'): 
        for view in views:
            view.SetElementOverrides(element.Id, overrides)

TransactionManager.Instance.TransactionTaskDone()

OUT = elements

```

The code does not work, any recommendations… please

---

<div class="post-metadata">

**Author:** ![AM3D.BIM.STUDIO](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/am3d.bim.studio/32/127441_2.png) [@AM3D.BIM.STUDIO](https://forum.dynamobim.com/u/AM3D.BIM.STUDIO)\
**Post date:** [September 6, 2024, 6:17am UTC](https://forum.dynamobim.com/t/modify-visibility-of-elements-by-assigned-view/104150/2 "2024-09-06T06:17:09Z")

</div>

> [@Use GeniusLoci's SetElementOverrides to override element color in view returns null](https://forum.dynamobim.com/t/use-geniuslocis-setelementoverrides-to-override-element-color-in-view-returns-null/64196/1):
>
> Hi, I am trying to override the line color of some of the elements I filtered out in view in Revit through Dynamo. Right now I am able to find the OverrideGraphicSettings.ByProperties to get the override and Document.ActiveView to get the view I want. The default Element.SetOverrideInView seems like not refreshing the view I am currently on so I used GeniusLoci’s custom node View SetElementOverride instead. However, the output list of the final node seems like only exporting null elements. Coul…
