Message 1 of 10
Creating filter rules
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I am having an issue setting filter rules. I am using the API docs as below
https://www.revitapidocs.com/2015/810b786e-afec-a383-ddda-21d1032d1b10.htm
Using python i can get everything besides the filter rules. I also believe that the process has changed in the API between 2019 and 2020 and there is limited documentation.
public static ParameterFilterElement Create( Document aDocument, string name, ICollection<ElementId> categories, IList<FilterRule> rules )
I managed to get to this, but it seems that the .create no longer takes this as the input
rule_01 = DB.ParameterFilterRuleFactory.CreateContainsRule(Parameter_ElementID, "Yes", False)
Rules_List.append(rule_01)
# Convert single FitlerRule to List<FilterRule>
rules = List[DB.FilterRule](Rules_List)