Kevin4
March 3, 2026, 8:16am
1
Hello all,
I am struggling to find the “View.SetFilterVisibility” node. I am seeing it exists in related posts (see below). But these unfortunately doesn’t help me in finding the node in dynamo.
Has it been removed? I am working in Dynamo Revit 3.3.0.6523. If it has been removed, how do we toggle the visibility of view filters now?
Related posts:
Hi all,
I am working on filters with Dynamo, different topics I have helped me a lot ! I am using Dynamo 2.0 or 1.3 sometimes to look for old nodes.
But I need the View.SetFilterVisibility() node and can’t find it. I have seen it exists but I can’t find it in my archi-lab package or in the others.
Do you have any idea ??
Thank you very much
Baudouin
I am having trouble adding a view filter to views and turning the visibility off.
I have a list of view filters (in watch node below) and a list of views that I want to apply only one filter parameter to. ie parameter.filter[0] is applied to view[0]. parameter.filter[1] is applied to view[1] etc.
When I use the View.AddFilter node from the archi-lab Grimshaw package by @Konrad_K_Sobon it applies all the view filters to every view, where as I only want a single view filter added.
When I use th…
Archi-Lab package if my memory and those posts are correct.
Kevin4
March 3, 2026, 10:24am
3
I have the Archi-lab package installed, but the View.SetFilterVisibility node doesnt seem to be included in there.
I did find Views.SetFilterOverrides, but it does not seem to behave like I was hoping.
Attached are my inputs to the nodes and the resulting view filters.
So, what are your trying to set / control?
Doesn’t these do what you want?
OR
Hi @Kevin4 maybe this could work for you
test view filters.dyn (4.8 KB)
Kevin4
March 3, 2026, 10:48am
6
I am trying to toggle the filter Visibility state. Both those nodes look like they should be able to do what I want, but they simply dont seem to trigger the desired effect.
Kevin4
March 3, 2026, 10:54am
7
Hello, the node you shared is almost exactly right. It is triggering the “Enable Filter” function of the desired filter instead of the “Visibility” function.
I guess you have to use @sovitek Python solution then.
Kevin4
March 3, 2026, 10:57am
9
Excuse me, I accidently replied to bvs1982. please see my response to your python node above!
allright then try as here and see if it better
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
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
view = UnwrapElement(IN[0])
filter = UnwrapElement(IN[1])
boolean = IN[2]
result = []
viewlist = []
TransactionManager.Instance.EnsureInTransaction(doc)
try:
for i in view:
viewlist.append(i.SetFilterVisibility(filter.Id, boolean))
result.append(True)
except:
result.append(False)
TransactionManager.Instance.TransactionTaskDone()
OUT = (view,result)
Kevin4
March 3, 2026, 11:05am
12
The new script doesnt seem to do anything to the filter as far as I can see.
arhhh my bad maybe here
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
views = IN[0] if isinstance(IN[0], list) else [IN[0]]
view_filter = UnwrapElement(IN[1])
state = IN[2]
results = []
TransactionManager.Instance.EnsureInTransaction(doc)
for v in views:
view = UnwrapElement(v)
try:
f_id = view_filter.Id
if not view.IsFilterApplied(f_id):
view.AddFilter(f_id)
view.SetFilterVisibility(f_id, state)
results.append(True)
except:
results.append(False)
TransactionManager.Instance.TransactionTaskDone()
OUT = (views)
1 Like
Kevin4
March 3, 2026, 11:24am
14
Yes! It works perfectly!
I dont think this node is able to handle lists, but i’ll manage without that.
Thank you very much for the help!
1 Like
havent tried but it could handle list as well as i tried with views…hard coded in the code, or create a costum dyf so we have option for lacing…i guess
Kevin4
March 4, 2026, 9:38am
18
View.SetFilterOverrides was my first instinct to use but I could not get it to work for me unfortunatly.