<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to filter element which satisfy filter rule in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8022779#M49856</link>
    <description>&lt;P&gt;Thanks, it worked marvelously &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 24 May 2018 05:44:09 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-05-24T05:44:09Z</dc:date>
    <item>
      <title>How to filter element which satisfy filter rule</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8020317#M49854</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to get the family instances which satisfy a filter rule as shown in the image below.&lt;/P&gt;&lt;P&gt;So far I'm able to get the&amp;nbsp;list of a category that has a specific filter name. But I'd like to get the family instances of those categories which satisfy the filter rule. I'm not sure how to do that via API. would appreciate any help thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="filter.PNG" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/503720i7BAA1920F7BBA811/image-size/medium?v=v2&amp;amp;px=400" role="button" title="filter.PNG" alt="filter.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 May 2018 09:27:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8020317#M49854</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-23T09:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter element which satisfy filter rule</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8021978#M49855</link>
      <description>&lt;P&gt;you can filter&amp;nbsp;the document, first for the categories of the filter, and then foreach filterrule.&lt;/P&gt;&lt;PRE&gt;			ParameterFilterElement filter ;

			ElementMulticategoryFilter catfilter = new ElementMulticategoryFilter(filter.GetCategories());
			IEnumerable&amp;lt;Element&amp;gt; ElemsByFilter = new FilteredElementCollector(doc)
				.WhereElementIsNotElementType()
				.WherePasses(catfilter);
			foreach(FilterRule rule in filter.GetRules())
			{
				ElemsByFilter = ElemsByFilter.Where( e =&amp;gt; rule.ElementPasses(e));
			}&lt;/PRE&gt;</description>
      <pubDate>Wed, 23 May 2018 19:42:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8021978#M49855</guid>
      <dc:creator>FAIR59</dc:creator>
      <dc:date>2018-05-23T19:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter element which satisfy filter rule</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8022779#M49856</link>
      <description>&lt;P&gt;Thanks, it worked marvelously &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 05:44:09 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8022779#M49856</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-24T05:44:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter element which satisfy filter rule</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8022802#M49857</link>
      <description>&lt;P&gt;Hi guys,&amp;nbsp;@Anonymous&amp;nbsp;and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2083518"&gt;@FAIR59&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for the interesting question and answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am sorry to say that I understand neither the one or the other.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you mind explaining the purpose of this to a pure programming nerd and Revit non-user?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am completely mystified.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;P.S.&amp;nbsp;By the way, &lt;SPAN&gt;ParameterFilterElement.GetRules() is obsolete in&amp;nbsp;&lt;/SPAN&gt;Revit 2019 and can be replaced by&amp;nbsp;&lt;SPAN&gt;GetElementFilter.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 06:02:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8022802#M49857</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-05-24T06:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter element which satisfy filter rule</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8022812#M49858</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/413917"&gt;@jeremytammik&lt;/a&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of course, I'd love to explain the question with pleasure. Let's say in Revit if someone needs to find all the walls on the Level 1 or a wall that has some thickness value xyz, they apply a filter rule and all the walls that satisfy a filter rule get highlighted.&amp;nbsp;&lt;/P&gt;&lt;P&gt;We needed this functionality in an add-in, so we could develop a BIM-Explorer for our Modelers to explore and navigate any element easily. The same idea was implemented by the ideatesoftware's&amp;nbsp;addin called ideate explorer, see the &lt;A href="https://youtu.be/KP7XFv_VL6M" target="_blank"&gt;video &lt;/A&gt;&amp;nbsp;for more information.&lt;/P&gt;&lt;P&gt;Please feel free to ask any question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Ali&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 06:10:16 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8022812#M49858</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-24T06:10:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter element which satisfy filter rule</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8022890#M49859</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;@Anonymous!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That helps me understand the context.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The sample code provided by&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/2083518"&gt;@FAIR59&lt;/a&gt;&amp;nbsp;highlights the solution very clearly on one hand, and confuses me on the other.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can&amp;nbsp;that be because it is purely for illustration purposes and makes little sense as it stands?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 06:45:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8022890#M49859</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-05-24T06:45:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter element which satisfy filter rule</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8022900#M49860</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/413917"&gt;@jeremytammik&lt;/a&gt;&amp;nbsp;I think the following code will make sense to you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; foreach (ParameterFilterElement pfe in new FilteredElementCollector(doc)
                .OfClass(typeof(ParameterFilterElement)).Cast&amp;lt;ParameterFilterElement&amp;gt;())
            {

               
                #region Get Filter Name, Category and Elements underlying the categories

                ParameterFilterElement filterElement = pfe;

                ElementMulticategoryFilter catfilter = new ElementMulticategoryFilter(filterElement.GetCategories());
                IEnumerable&amp;lt;Element&amp;gt; ElemsByFilter = new FilteredElementCollector(doc)
                    .WhereElementIsNotElementType()
                    .WherePasses(catfilter);
                foreach (FilterRule rule in filterElement.GetRules())
                {
                    ElemsByFilter = ElemsByFilter.Where(e =&amp;gt; rule.ElementPasses(e));
                }

                #endregion

            }&lt;/PRE&gt;</description>
      <pubDate>Thu, 24 May 2018 06:49:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8022900#M49860</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-24T06:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter element which satisfy filter rule</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8022903#M49861</link>
      <description>&lt;P&gt;Also you can check out this link too:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://boostyourbim.wordpress.com/2016/05/11/filter-rule-data-where-is-it-hiding/" target="_blank"&gt;https://boostyourbim.wordpress.com/2016/05/11/filter-rule-data-where-is-it-hiding/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 06:50:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8022903#M49861</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-24T06:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter element which satisfy filter rule</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8023019#M49862</link>
      <description>&lt;P&gt;Many thanks,&amp;nbsp;@Anonymous!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 07:54:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8023019#M49862</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-05-24T07:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter element which satisfy filter rule</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8023144#M49863</link>
      <description>&lt;P&gt;Discussion and solution edited and preserved here for posterity:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://thebuildingcoder.typepad.com/blog/2018/05/filterrule-use-and-retrieving-exterior-walls.html#9" target="_blank"&gt;http://thebuildingcoder.typepad.com/blog/2018/05/filterrule-use-and-retrieving-exterior-walls.html#9&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jeremy&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 May 2018 09:04:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-filter-element-which-satisfy-filter-rule/m-p/8023144#M49863</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-05-24T09:04:50Z</dc:date>
    </item>
  </channel>
</rss>

