Hi, im using Revit 2021
1- I am trying to create a filter that uses a rule of 'does not contain, and it seems there is no class FilterStringDoesNotContain
for that.
2- in addition, I successfully created a filter that colors elements in green, but i cant get it to color the elements in a solid pattern.
can you guys help me with these 2 things please?
thank you
........
pvp = ParameterValueProvider(param.Id)
# remember. rule_1 and rule_2 belongs to separate filters and do not go on the same List[FilterRule]()
rule_1 = FilterStringRule(pvp, FilterStringEquals(), 'some value', True)
# This is suppose to be the does not contain rule
rule_2 = FilterStringRule(pvp, FilterString?????)
rules_1 = List[FilterRule]([rule_1])
rules_2 = List[FilterRule]([rule_2])
filter_1 = ElementParameterFilter(rules)
view_filter = ParameterFilterElement.Create(doc, filter_1_name, categories, filter_1)
# overrides for filter
rgb_green = Color(0, 255, 0)
# rgb_orange = Color(255, 128, 54)
overrideSettings_rule_1 = OverrideGraphicSettings()
overrideSettings_rule_1.SetSurfaceForegroundPatternColor(rgb_green)
overrideSettings_rule_1.SetProjectionLineColor(rgb_green)
active_view = doc.ActiveView
active_view.AddFilter(view_filter.Id)
active_view.SetFilterOverrides(view_filter.Id, overrideSettings_rule_1)
t.Commit()