I totally understand you and that was definitely not what I intended. Sorry!
I tried to take the idea from the link and put it in a python script. Sorry, Iâm at the very beginning with this. Maybe I should have started with something easierâŚ
But here is what I have so far. It seems to work until the filter. (If I delete the row #35 and say âOUT = rulesâ I get an outputâŚ)
So, I would be very thankful if you could help me with this: filter = ParameterFilterElement.Create(doc, âTestâ, categories, rules)
I donât see what is missing, or is it a wrong code?
import clr
clr.AddReference(âRevitAPIâ)
from Autodesk.Revit.DB import *
from System.Collections.Generic 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 = doc.ActiveView
#name = IN[0]
#category = IN[1]
#parametername = IN[2]
#parameterrule = IN[3]
#parametervalue = IN[4]
categories =
categories.Add(ElementId(BuiltInCategory.OST_Walls))
collector = FilteredElementCollector(doc)
wallWidth = collector.OfClass(WallType).FirstElement().get_Parameter(BuiltInParameter.WALL_ATTR_WIDTH_PARAM)
rules =
rules.Add(ParameterFilterRuleFactory.CreateLessRule(wallWidth.Id, 0.5, 0.001))
#TransactionManager.Instance.EnsureInTransaction(doc)
#filter = ParameterFilterElement.Create(doc, âTestâ, categories, rules);
#view.AddFilter(filter.Id)
#TransactionManager.Instance.TransactionTaskDone()
OUT = rules
Thanks,Dennis