<?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 List all parameter data types? in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/list-all-parameter-data-types/m-p/7245130#M57061</link>
    <description>&lt;P&gt;Is there a way to list all of the shared parameter data types that are available to Revit as they would appear in the shared parameters file (e.g., HVAC_AIR_FLOW)? To be clear, I am not looking for the parameter data types in a single project or family, but all that are available within Revit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jul 2017 14:31:13 GMT</pubDate>
    <dc:creator>jaySZWNK</dc:creator>
    <dc:date>2017-07-21T14:31:13Z</dc:date>
    <item>
      <title>List all parameter data types?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/list-all-parameter-data-types/m-p/7245130#M57061</link>
      <description>&lt;P&gt;Is there a way to list all of the shared parameter data types that are available to Revit as they would appear in the shared parameters file (e.g., HVAC_AIR_FLOW)? To be clear, I am not looking for the parameter data types in a single project or family, but all that are available within Revit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jul 2017 14:31:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/list-all-parameter-data-types/m-p/7245130#M57061</guid>
      <dc:creator>jaySZWNK</dc:creator>
      <dc:date>2017-07-21T14:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: List all parameter data types?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/list-all-parameter-data-types/m-p/7250228#M57062</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4079900"&gt;@jaySZWNK&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Is there a list? I don't know.&lt;/P&gt;
&lt;P&gt;Can you make one? Yes:&lt;/P&gt;
&lt;P&gt;Create a shared parameter in a shared parameter file for each item in the db.ParameterType enumeration. You'll probably need to put a try-catch around each item as some items in the enumeration may be 'old'.&lt;/P&gt;
&lt;PRE&gt;'get enumeration values
Dim members As System.Array = _
  System.Enum.GetValues(GetType(DB.ParameterType))
&lt;/PRE&gt;
&lt;P&gt;This help file link has code that shows you how to create your own shared parameter definition in your shared parameter file. (Approx. the first half of the supplied code.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.revitapidocs.com/2017/7978cb57-0a48-489e-2c8f-116fa2561437.htm" target="_blank"&gt;http://www.revitapidocs.com/2017/7978cb57-0a48-489e-2c8f-116fa2561437.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may find the GetLabelFor parameterType overload useful also (to keep track of what's what):&lt;/P&gt;
&lt;P&gt;&lt;A href="http://www.revitapidocs.com/2017/11b3e9c9-931b-710e-8590-04f4bad86e45.htm" target="_blank"&gt;http://www.revitapidocs.com/2017/11b3e9c9-931b-710e-8590-04f4bad86e45.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2017 17:51:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/list-all-parameter-data-types/m-p/7250228#M57062</guid>
      <dc:creator>matthew_taylor</dc:creator>
      <dc:date>2017-07-24T17:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: List all parameter data types?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/list-all-parameter-data-types/m-p/7253439#M57063</link>
      <description>&lt;P&gt;Thanks for the guidance. I will give this a shot!&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 18:42:13 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/list-all-parameter-data-types/m-p/7253439#M57063</guid>
      <dc:creator>jaySZWNK</dc:creator>
      <dc:date>2017-07-25T18:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: List all parameter data types?</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/list-all-parameter-data-types/m-p/7273046#M57064</link>
      <description>&lt;P&gt;Dear&amp;nbsp;&lt;SPAN class=""&gt;&lt;A id="link_6da362be5f39d0" class="lia-link-navigation lia-page-link lia-user-name-link" href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4079900" target="_self"&gt;jaySZWNK&lt;/A&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;!--StartFragment --&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV&gt;Please&amp;nbsp;accept&amp;nbsp;our&amp;nbsp;sincerer&amp;nbsp;apology&amp;nbsp;for&amp;nbsp;the&amp;nbsp;delay!&amp;nbsp;We&amp;nbsp;had&amp;nbsp;a&amp;nbsp;backlog&amp;nbsp;in&amp;nbsp;the&amp;nbsp;queue.&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;If you want to get all shared parameter data types, you need to create it manually.&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;Hope following codes can help you:&lt;/DIV&gt;
&lt;DIV&gt;
&lt;PRE&gt;private List&amp;lt;ParameterType&amp;gt; getAllSharedParameters(Application app, Document doc)
        {
            List&amp;lt;ParameterType&amp;gt; ret = new List&amp;lt;ParameterType&amp;gt;();

            string filename = app.SharedParametersFilename;
            if (!string.IsNullOrEmpty(filename))
            {
                // get the current shared params file object:
                DefinitionFile file = app.OpenSharedParameterFile();

                if (null != file)
                {
                    foreach (var gp in file.Groups)
                    {
                        foreach (var d in gp.Definitions)
                        {
                            ret.Add(d.ParameterType);
                        }
                    }
                }
            }

            return ret;
        }&lt;/PRE&gt;
&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;</description>
      <pubDate>Thu, 03 Aug 2017 03:32:11 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/list-all-parameter-data-types/m-p/7273046#M57064</guid>
      <dc:creator>JimJia</dc:creator>
      <dc:date>2017-08-03T03:32:11Z</dc:date>
    </item>
  </channel>
</rss>

