<?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: BuiltInParameter Invalid in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/builtinparameter-invalid/m-p/8774292#M42613</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Thanks Jeremy, your answer helped me a lot, I use LookuParameter, this is my code in case someone needs&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Parameter p = e.LookupParameter("Sector");&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if (p.StorageType == StorageType.String)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;var q =p.AsString();&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;p.Set(Convert.ToString(q));&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you very much Jeremy, regards&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 06 May 2019 22:26:58 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-05-06T22:26:58Z</dc:date>
    <item>
      <title>BuiltInParameter Invalid</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/builtinparameter-invalid/m-p/8772211#M42611</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello friends, I need help, how do I get the AsString of a parameter with invalid built-in parameter? ,&amp;nbsp;thank you very much for your attention&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CapturaAF1_LI.jpg" style="width: 572px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/633409i75DBC94D3A9CC72D/image-size/large?v=v2&amp;amp;px=999" role="button" title="CapturaAF1_LI.jpg" alt="CapturaAF1_LI.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CapturaAF2_LI.jpg" style="width: 999px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/633410i0C1EEA454E94102E/image-size/large?v=v2&amp;amp;px=999" role="button" title="CapturaAF2_LI.jpg" alt="CapturaAF2_LI.jpg" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="CapturaAF3_LI.jpg" style="width: 560px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/633408i368212DCB8F1B00D/image-size/large?v=v2&amp;amp;px=999" role="button" title="CapturaAF3_LI.jpg" alt="CapturaAF3_LI.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 03:24:24 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/builtinparameter-invalid/m-p/8772211#M42611</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-06T03:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: BuiltInParameter Invalid</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/builtinparameter-invalid/m-p/8772332#M42612</link>
      <description>&lt;P&gt;Some parameters are built in, so you can use the BuiltInParameter enumeration value to identify and access them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Others are not built in, but are generated by other means.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For those, you can use the parameter id or the display string.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For shared parameters, you can also use the GUID.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As you show us in your screen snapshot, RevitLookup is able to display the parameter value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can debug RevitLookup yourself and see how it does that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look at the Element.Parameter property to see the different options to read a specific parameter value from an element:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://apidocs.co/apps/revit/2019/a742d71a-b415-9e99-2978-abd3b5bae7f2.htm" target="_blank"&gt;https://apidocs.co/apps/revit/2019/a742d71a-b415-9e99-2978-abd3b5bae7f2.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can also use GetParameters to get all parameters of a specific display name:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://apidocs.co/apps/revit/2019/0cf342ef-c64f-b0b7-cbec-da8f3428a7dc.htm" target="_blank"&gt;https://apidocs.co/apps/revit/2019/0cf342ef-c64f-b0b7-cbec-da8f3428a7dc.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;LookupParameter also exists and just returns the first parameter found with a specific display name:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://apidocs.co/apps/revit/2019/4400b9f8-3787-0947-5113-2522ff5e5de2.htm" target="_blank"&gt;https://apidocs.co/apps/revit/2019/4400b9f8-3787-0947-5113-2522ff5e5de2.htm&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That is obviously risky if more than one might exist.&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>Mon, 06 May 2019 06:33:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/builtinparameter-invalid/m-p/8772332#M42612</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2019-05-06T06:33:34Z</dc:date>
    </item>
    <item>
      <title>Re: BuiltInParameter Invalid</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/builtinparameter-invalid/m-p/8774292#M42613</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thanks Jeremy, your answer helped me a lot, I use LookuParameter, this is my code in case someone needs&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Parameter p = e.LookupParameter("Sector");&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if (p.StorageType == StorageType.String)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;var q =p.AsString();&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;p.Set(Convert.ToString(q));&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you very much Jeremy, regards&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 May 2019 22:26:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/builtinparameter-invalid/m-p/8774292#M42613</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-06T22:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: BuiltInParameter Invalid (Bug?)</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/builtinparameter-invalid/m-p/9210762#M42614</link>
      <description>&lt;DIV&gt;&lt;FONT&gt;When parsing the BuiltInParameters in Dynamo (Python Script) and trying to pull the LabelUtils.GetLabelFor to the human readable label, there are several bips that come up with nothing for the label. (And one invalid, so haven't figured that out either.)&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;These bips do have strings (or should) as says the API.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;I'm guessing this is something not right in either IronPython or Dynamo's implementation. Not sure where to post this as a bug.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;Autodesk.Revit.DB.BuiltInParameter,STRUCTURAL_CONNECTION_SYMBOL,&lt;BR /&gt;Autodesk.Revit.DB.BuiltInParameter,STAIRS_LANDINGTYPE_TREADRISER_TYPE,&lt;BR /&gt;Autodesk.Revit.DB.BuiltInParameter,SPACE_PEOPLE_ACTIVITY_LEVEL_PARAM,&lt;BR /&gt;Autodesk.Revit.DB.BuiltInParameter,RBS_DUCT_FITTING_LOSS_TABLE_PARAM,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT&gt;&lt;FONT&gt;Autodesk.Revit.DB.BuiltInParameter,SPACING_JUSTIFICATION,&lt;BR /&gt;Autodesk.Revit.DB.BuiltInParameter,SPACING_APPEND,&lt;BR /&gt;Autodesk.Revit.DB.BuiltInParameter,SURFACE_PATTERN_ID_PARAM,&lt;BR /&gt;Autodesk.Revit.DB.BuiltInParameter,INVALID,&lt;/FONT&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;PRE&gt;    myBuiltInParameterData = []
    myBuiltInParameterError = []
    for bip in myBuiltInParameters:
    try:
    myBuiltInParameterData.append([LabelUtils.GetType(bip), bip, LabelUtils.GetLabelFor(bip)])
    except:
    myBuiltInParameterError.append([LabelUtils.GetType(bip), bip, None])
    myBuiltInParameterGroups = System.Enum.GetValues(BuiltInParameterGroup)&lt;/PRE&gt;&lt;FONT&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Wed, 18 Dec 2019 23:16:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/builtinparameter-invalid/m-p/9210762#M42614</guid>
      <dc:creator>aaron_rumple</dc:creator>
      <dc:date>2019-12-18T23:16:33Z</dc:date>
    </item>
    <item>
      <title>Re: BuiltInParameter Invalid (Bug?)</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/builtinparameter-invalid/m-p/9211162#M42615</link>
      <description>&lt;P&gt;You can submit a problem report right here, if you like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please provide am minimal reproducible case for it, e.g., a minimal sample project containing a macro that reproduces the problem:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/about-the-author.html#1b" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/about-the-author.html#1b&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In this case, the BIM project can basically be empty, and the macro is the only important aspect.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Zip it up into an archive file and attach it to your message.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2019 07:45:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/builtinparameter-invalid/m-p/9211162#M42615</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2019-12-19T07:45:20Z</dc:date>
    </item>
  </channel>
</rss>

