<?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: Create FilterRule: get &amp;quot;ParameterId&amp;quot; without elements in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/create-filterrule-get-quot-parameterid-quot-without-elements/m-p/6522126#M63393</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;see also:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/revit-api/project-parameter-id-amp-guid/m-p/5834037#M12010" target="_blank"&gt;http://forums.autodesk.com/t5/revit-api/project-parameter-id-amp-guid/m-p/5834037#M12010&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revitalizer&lt;/P&gt;</description>
    <pubDate>Thu, 25 Aug 2016 10:53:41 GMT</pubDate>
    <dc:creator>Revitalizer</dc:creator>
    <dc:date>2016-08-25T10:53:41Z</dc:date>
    <item>
      <title>Create FilterRule: get "ParameterId" without elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-filterrule-get-quot-parameterid-quot-without-elements/m-p/6521891#M63391</link>
      <description>&lt;P&gt;I'm writing an application&amp;nbsp;for batch creating ViewFilters (ParameterFilterElement).&lt;/P&gt;
&lt;P&gt;For creating filter I want to create FilterRule:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;FilterRule stringRule =&amp;nbsp;ParameterFilterRuleFactory.CreateEqualsRule(ParameterId, StringValue, true);&lt;/PRE&gt;
&lt;P&gt;How to get "ParameterId" for shared parameter?&lt;/P&gt;
&lt;P&gt;SDK contains two examples:&amp;nbsp;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;for BuiltIn Parameter:&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;
&lt;PRE&gt;ElementId ParamId = new ElementId(BuiltInParameter.FUNCTION_PARAM);&lt;/PRE&gt;
&lt;/LI&gt;
&lt;LI&gt;for SharedParameter:&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;Wall wall = new FilteredElementCollector(doc).OfClass(typeof(Wall)).FirstElement() as Wall;
Parameter sharedParam = wall.get_Parameter(spGuid);
ElementId sharedParamId = sharedParam.Id;
&lt;/PRE&gt;
&lt;P&gt;OMG: create collector for all elements in model, get one element, get parameter from this element? I think this is a bad way.&lt;/P&gt;
&lt;P&gt;If model have no element - collector will be empty, I can't get Parameter and create Rule, other problem is possible.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Is there an another way to get ParameterId? Without elements and collectors, as for BuiltIn Parameter&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;For example, by the Definition, BindingMap, etc. After all,&amp;nbsp;manually in Revit interface I can create Rule,&amp;nbsp;even if there is no element in the model.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 08:17:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-filterrule-get-quot-parameterid-quot-without-elements/m-p/6521891#M63391</guid>
      <dc:creator>Extraneous</dc:creator>
      <dc:date>2016-08-25T08:17:46Z</dc:date>
    </item>
    <item>
      <title>Re: Create FilterRule: get "ParameterId" without elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-filterrule-get-quot-parameterid-quot-without-elements/m-p/6522085#M63392</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;since 2016, there is a SharedParameterElement class, derived from Element.&lt;/P&gt;
&lt;P&gt;This provides a GuidValue property and also a GetDefinition() method.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 10:23:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-filterrule-get-quot-parameterid-quot-without-elements/m-p/6522085#M63392</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2016-08-25T10:23:49Z</dc:date>
    </item>
    <item>
      <title>Re: Create FilterRule: get "ParameterId" without elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-filterrule-get-quot-parameterid-quot-without-elements/m-p/6522126#M63393</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;see also:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://forums.autodesk.com/t5/revit-api/project-parameter-id-amp-guid/m-p/5834037#M12010" target="_blank"&gt;http://forums.autodesk.com/t5/revit-api/project-parameter-id-amp-guid/m-p/5834037#M12010&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Revitalizer&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 10:53:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-filterrule-get-quot-parameterid-quot-without-elements/m-p/6522126#M63393</guid>
      <dc:creator>Revitalizer</dc:creator>
      <dc:date>2016-08-25T10:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Create FilterRule: get "ParameterId" without elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-filterrule-get-quot-parameterid-quot-without-elements/m-p/6530988#M63394</link>
      <description>Thanks,&lt;BR /&gt;This method works good, but only for shared parameter. FilterRule also want to works with BuiltInParameter and ProjectParameter. Seems to be, collector and LookupParameter is only one way in this case.</description>
      <pubDate>Tue, 30 Aug 2016 12:38:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-filterrule-get-quot-parameterid-quot-without-elements/m-p/6530988#M63394</guid>
      <dc:creator>Extraneous</dc:creator>
      <dc:date>2016-08-30T12:38:44Z</dc:date>
    </item>
    <item>
      <title>Re: Create FilterRule: get "ParameterId" without elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/create-filterrule-get-quot-parameterid-quot-without-elements/m-p/9945102#M63395</link>
      <description>&lt;P&gt;Is there any update on this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;"Is there an another way to get ParameterId? Without elements and collectors, as for BuiltIn Parameter&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;For example, by the Definition, BindingMap, etc. After all,&amp;nbsp;manually in Revit interface I can create Rule,&amp;nbsp;even if there is no element in the model."&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 23:21:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/create-filterrule-get-quot-parameterid-quot-without-elements/m-p/9945102#M63395</guid>
      <dc:creator>sdcartmell</dc:creator>
      <dc:date>2020-12-16T23:21:20Z</dc:date>
    </item>
  </channel>
</rss>

