# Get Filter Rule Information

**URL:** <https://forum.dynamobim.com/t/get-filter-rule-information/91325>\
**Category:** Revit\
**Tags:** python\
**Created:** [July 1, 2023, 12:09am UTC](https://forum.dynamobim.com/t/get-filter-rule-information/91325 "2023-07-01T00:09:07Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![vancikv](https://avatars.discourse-cdn.com/v4/letter/v/65b543/32.png) [@vancikv](https://forum.dynamobim.com/u/vancikv)\
**Post date:** [July 1, 2023, 1:34pm UTC](https://forum.dynamobim.com/t/get-filter-rule-information/91325/2 "2023-07-01T13:34:40Z")

</div>

You have to dig deeper, it’s more convoluted than you’d expect (or certainly than I’d expect) 🙂

```auto
pfes = FilteredElementCollector(doc).OfClass(ParameterFilterElement).ToElements()
pfe = pfes[0]
elFilter = pfe.GetElementFilter()
filters = elFilter.GetFilters()
filter = filters[0]
rules = filter.GetRules()
rule = rules[0]
ruleString = rule.RuleString

```

The code is just bare minimum, assuming I’m always interested in the very first element when there’s an array. Just to show the important stuff.

I needed to get this in order, too, so I made this diagram

 ![RuleValue](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/8/f8bc3164670ea4fedc43c1572e9855b087ed4ce4.png)

Btw what Revit version are you using? I’m in 2023 and I don’t see a “Section Type” parameter, only “Family and Type”

---

_[View the full topic](https://forum.dynamobim.com/t/get-filter-rule-information/91325)._
