<?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 Need to list all parameter type names in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/need-to-list-all-parameter-type-names/m-p/13814841#M84690</link>
    <description>&lt;P&gt;I want to programmatically add family parameters to a family doc using this method:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;FamilyManager.AddParameter(String, ForgeTypeId, ForgeTypeId, Boolean)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To create a parameter, you must input the parameter type. To create a text parameter you would use this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;SpecTypeId.String.Text&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But let's say I want to give the user a drop-down menu so they can select which parameter type, similar to the Revit UI:&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-inline" image-alt="Screenshot 2025-09-17 125823.png" style="width: 428px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1571761i5ECF8B4F5FF92835/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-09-17 125823.png" alt="Screenshot 2025-09-17 125823.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I need to list all parameter type names.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can use this to get all parameter types:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;param_types = SpecUtils.GetAllSpecs()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But how do I get their names?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Everything about ForgeTypeId is very confusing to me.&lt;/P&gt;</description>
    <pubDate>Wed, 17 Sep 2025 17:04:35 GMT</pubDate>
    <dc:creator>frankloftus</dc:creator>
    <dc:date>2025-09-17T17:04:35Z</dc:date>
    <item>
      <title>Need to list all parameter type names</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/need-to-list-all-parameter-type-names/m-p/13814841#M84690</link>
      <description>&lt;P&gt;I want to programmatically add family parameters to a family doc using this method:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;FamilyManager.AddParameter(String, ForgeTypeId, ForgeTypeId, Boolean)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To create a parameter, you must input the parameter type. To create a text parameter you would use this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;SpecTypeId.String.Text&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But let's say I want to give the user a drop-down menu so they can select which parameter type, similar to the Revit UI:&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-inline" image-alt="Screenshot 2025-09-17 125823.png" style="width: 428px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1571761i5ECF8B4F5FF92835/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2025-09-17 125823.png" alt="Screenshot 2025-09-17 125823.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I need to list all parameter type names.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can use this to get all parameter types:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;param_types = SpecUtils.GetAllSpecs()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But how do I get their names?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Everything about ForgeTypeId is very confusing to me.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Sep 2025 17:04:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/need-to-list-all-parameter-type-names/m-p/13814841#M84690</guid>
      <dc:creator>frankloftus</dc:creator>
      <dc:date>2025-09-17T17:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: Need to list all parameter type names</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/need-to-list-all-parameter-type-names/m-p/13815837#M84693</link>
      <description>&lt;P&gt;You can consider ForgeTypeId is just a fancy Autodesk type wrapping predefined enumeration. A part of it defines unit, while other part defines parameter type (spec type), etc..&lt;BR /&gt;As for getting the name of a given SpecTypeId, you might want to take a look at the LabelUtils.GetLabelForSpec() method.&amp;nbsp;&lt;BR /&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Sep 2025 08:14:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/need-to-list-all-parameter-type-names/m-p/13815837#M84693</guid>
      <dc:creator>longt61</dc:creator>
      <dc:date>2025-09-18T08:14:42Z</dc:date>
    </item>
    <item>
      <title>Re: Need to list all parameter type names</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/need-to-list-all-parameter-type-names/m-p/13816257#M84694</link>
      <description>&lt;P&gt;Thank you. That is exactly what I needed. I looked through SpecUtils and didn't find any way to get a spec name. I didn't even think to look at another separate util class. I feel that these util classes are not grouped logically with the objects they operate on (not very OOP). Here is the solution I arrived at:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;from selection_form_module import selection_form
from Autodesk.Revit.DB import SpecTypeId, SpecUtils, LabelUtils

# Get all param types
param_types_dict = {LabelUtils.GetLabelForSpec(spec) : spec \
					for spec in SpecUtils.GetAllSpecs()}

# Get sorted list of all param_type_names
param_type_names = sorted(param_types_dict.keys())

# Create selection_form
form = selection_form(param_type_names, 'Choose Parameter Type', 'Select')

# Show form
form.ShowDialog()

# Get the selected param_type_name
selected_param_type_name = form.selected

# Get param_type with selected name
selected_param_type = param_types_dict[selected_param_type_name]

# Output param_type
return selected_param_type&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 18 Sep 2025 13:33:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/need-to-list-all-parameter-type-names/m-p/13816257#M84694</guid>
      <dc:creator>frankloftus</dc:creator>
      <dc:date>2025-09-18T13:33:01Z</dc:date>
    </item>
  </channel>
</rss>

