I would like to create a filter, assign it to a view and turn its visibility off.
I already found how to create the filter and assign it to a view. It is also solved how to change its graphic override, but I could not find a way to turn its visibility off.
Does anyone know a solution for that?
This is the custom node that I use:
This is what I got from this topic “Create and add view filter (ParameterFilterElement)”:
The problem is in Line 53. It does not give a warning, but definitely does not turn the visibility off. What can be the problem?
Here is the code for copy/paste:
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
from Autodesk.Revit.DB import *
from System.Collections.Generic import *
dataEnteringNode = IN
builtInParams = System.Enum.GetValues(BuiltInParameter)
for i in builtInParams:
if i.ToString() == paramName:
return test 
cats = IN
paramName = IN
pValue = IN
filName = IN
view = UnwrapElement(IN)
for i in cats:
typedCatList = ListElementId
bip = GetBuiltInParam(paramName)
rules.append(ParameterFilterRuleFactory.CreateNotBeginsWithRule(ElementId(bip), pValue, 0.001))
filter = ParameterFilterElement.Create(doc, filName, typedCatList, rules)
OUT = view