
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I am trying to make an addin (Revit 2018 with C#) that lists all the view filter in a project, with their name, their category(ies), filter rules and filter values.
As long as there are no inverse filter rules it works.
Please see this example:
if (rule is FilterDoubleRule)
{
FilterDoubleRule fdr = rule as FilterDoubleRule;
if (fdr.GetEvaluator().GetType().Equals(typeof(FilterNumericLess)))
comparator = "<";
else if (fdr.GetEvaluator().GetType().Equals(typeof(FilterNumericEquals)))
comparator = "=";
else if (fdr.GetEvaluator().GetType().Equals(typeof(FilterNumericLessOrEqual)))
comparator = "<=";
else if (fdr.GetEvaluator().GetType().Equals(typeof(FilterNumericGreater)))
comparator = ">";
else if (fdr.GetEvaluator().GetType().Equals(typeof(FilterNumericGreaterOrEqual)))
comparator = ">=";
ruleValue = fdr.RuleValue.ToString();
}
I do the same for the Integer and String rules. And this works.
But when there are inverse filter rules like "Not Equal", "Does Not Contain", "Does not Begin with", ... then I don't know how to access the filter rule and rule value.
I hope that somebody here can help me.
Thank you in advance.
Solved! Go to Solution.