<?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: Revit 2022: ParameterType.Text to ForgeTypeId in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10237173#M26730</link>
    <description>&lt;P&gt;Thank you for the great explanation. Shared here for posterity:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/2021/04/pdf-export-forgetypeid-and-multi-target-add-in.html#2" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/2021/04/pdf-export-forgetypeid-and-multi-target-add-in.html#2&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Apr 2021 10:28:29 GMT</pubDate>
    <dc:creator>jeremy_tammik</dc:creator>
    <dc:date>2021-04-14T10:28:29Z</dc:date>
    <item>
      <title>Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10225741#M26722</link>
      <description>&lt;P&gt;Could somebody please help me out with this conversion from Deprecated ParameterType to ForgeTypeId for Revit 2022 Api?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The 'old' code has a line like:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if (parameter.Definition.ParameterType == ParameterType.Text)&amp;nbsp; ....&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What would be the 2022 equivalent for it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It seems that the left side may be:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if (parameter.Definition.GetDataType() == ????)&amp;nbsp; ....&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;but for some reason I cannot find what do I have to use on right side of the operation &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; There must be something I am overlooking.&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 17:53:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10225741#M26722</guid>
      <dc:creator>peter_sylvester</dc:creator>
      <dc:date>2021-04-09T17:53:35Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10227195#M26723</link>
      <description>&lt;P&gt;Hi! To perform this check you need to create instance of &lt;A href="https://www.revitapidocs.com/2021.1/d9fcf276-9566-de83-2b0b-d89b65ccc8af.htm" target="_blank" rel="noopener"&gt;ForgeTypeId&lt;/A&gt; class. Use one of the &lt;A href="https://www.revitapidocs.com/2021.1/901adcef-5279-8855-f267-6bb1f53621ca.htm" target="_blank" rel="noopener"&gt;SpecTypeId&lt;/A&gt;'s properties to get value to compare with. In your case (for text parameter) you need Number property:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;&amp;gt;&amp;gt;&amp;gt; element.Parameter[BuiltInParameter.ALL_MODEL_MARK].Definition.GetSpecTypeId() == SpecTypeId.Number
True&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Also take a look at &lt;A href="https://forums.autodesk.com/t5/revit-api-forum/forgetypeid-how-to-use/td-p/9439210" target="_blank" rel="noopener"&gt;this&lt;/A&gt; conversation.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Apr 2021 11:08:30 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10227195#M26723</guid>
      <dc:creator>architect.bim</dc:creator>
      <dc:date>2021-04-10T11:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10227398#M26724</link>
      <description>&lt;P&gt;Oh dear! This is super confusing. I've just checked and Parameter Definition that store TEXT have a SpecTypeId.Number!!&amp;nbsp; &amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;😮&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Apr 2021 14:01:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10227398#M26724</guid>
      <dc:creator>peter_sylvester</dc:creator>
      <dc:date>2021-04-10T14:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10227443#M26725</link>
      <description>&lt;P&gt;Oh dear! This is super confusing. I've just checked and Parameter Definition that store TEXT have a SpecTypeId = SpecTypeId.Number&amp;nbsp;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":face_with_open_mouth:"&gt;😮&lt;/span&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now how do you distinguish between actual &lt;STRONG&gt;Numbers&lt;/STRONG&gt; and &lt;STRONG&gt;Text ??&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It looks like the problem is this:&lt;/P&gt;&lt;P&gt;The Autodesk.Revit.DB.InternalDefinition class has:&lt;/P&gt;&lt;P&gt;- ParameterType&amp;nbsp; - this can be: Invalid | Text | Integer | Number&lt;/P&gt;&lt;P&gt;- UnitType -&amp;nbsp; seemingly for Text type parameters this is "UT_Number"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now with ParameterType becoming obsolete, we have to use Parameter.GetSpecTypeId() that SEEMINGLY coresponds to the "UnitType" member above and for Text parameters like "Comment" it has a value of SpecTypeId.Number!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The question is: How can I know if a Parameter is Text or not in Revit 2022 - without using Definition.ParameterType ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Same would apply to YesNo type parameters... SpecTypeId cannot be used to determine if a ParameterDefinition is for a YesNo type parameter...&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And even more: The ONLY place where I can see if a parameter is a YesNo parameter is in the Parameter.Definition.ParameterType !! If ParameterType is obsolete... how to determine if a parameter is YesNo or something else?&lt;/P&gt;</description>
      <pubDate>Sat, 10 Apr 2021 14:22:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10227443#M26725</guid>
      <dc:creator>peter_sylvester</dc:creator>
      <dc:date>2021-04-10T14:22:44Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10227569#M26726</link>
      <description>&lt;P&gt;It is a well-known fact that unit type of text is number. Actually I don't know why&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;. But you definetly should use Number property. Each Parameter object also has StorageType property. In case of Yes/No parameter its value is Integer. In case of Text parameter - string. I hope this solves your problem.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Apr 2021 15:13:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10227569#M26726</guid>
      <dc:creator>architect.bim</dc:creator>
      <dc:date>2021-04-10T15:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10231238#M26727</link>
      <description>&lt;P&gt;Well, sorry for my ignorance but seemingly there is still one 'minor' issue left for me to be answered. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;var option = new ExternalDefinitionCreationOptions("ExampleParamForge", SpecTypeId.XXX???);
var definition = definitionGroup.Definitions.Create(option);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using SpecTypeId.Number&amp;nbsp; creates a Parameter that has the "Type of Parameter" set to Number (obviously!, right?)&lt;/P&gt;&lt;P&gt;How do I create a simple TEXT Parameter definition using the Revit 2022 API?&lt;/P&gt;&lt;P&gt;There must be something here that I am missing &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your attention.&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 13:04:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10231238#M26727</guid>
      <dc:creator>peter_sylvester</dc:creator>
      <dc:date>2021-04-12T13:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10231439#M26728</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To create a text parameter, please use &lt;STRONG&gt;SpecTypeId.String.Text&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For context, the &lt;STRONG&gt;ForgeTypeId&lt;/STRONG&gt; properties directly in the &lt;STRONG&gt;SpecTypeId&lt;/STRONG&gt; class identify the measurable data types, like &lt;STRONG&gt;SpecTypeId.Length&lt;/STRONG&gt; or &lt;STRONG&gt;SpecTypeId.Mass&lt;/STRONG&gt;. The non-measurable data types are organized into nested classes within &lt;STRONG&gt;SpecTypeId&lt;/STRONG&gt;, like &lt;STRONG&gt;SpecTypeId.String.Text&lt;/STRONG&gt;, &lt;STRONG&gt;SpecTypeId.Boolean.YesNo&lt;/STRONG&gt;, &lt;STRONG&gt;SpecTypeId.Int.Integer&lt;/STRONG&gt;, or &lt;STRONG&gt;SpecTypeId.Reference.Material&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regarding text parameters that report their type as "Number", here's the history:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Prior to Revit 2021, a &lt;STRONG&gt;Definition&lt;/STRONG&gt; had a &lt;STRONG&gt;UnitType&lt;/STRONG&gt; and a &lt;STRONG&gt;ParameterType&lt;/STRONG&gt;. The &lt;STRONG&gt;UnitType&lt;/STRONG&gt; property was only meaningful for parameters with measurable &lt;STRONG&gt;ParameterType&lt;/STRONG&gt; values, and a parameter with &lt;STRONG&gt;ParameterType.Text&lt;/STRONG&gt; would report a meaningless &lt;STRONG&gt;UnitType.Number&lt;/STRONG&gt; value.&lt;/LI&gt;&lt;LI&gt;Revit 2021 deprecated the &lt;STRONG&gt;UnitType&lt;/STRONG&gt; property and replaced it with the &lt;STRONG&gt;GetSpecTypeId() &lt;/STRONG&gt;method. But the behavior remained the same -- a parameter with &lt;STRONG&gt;ParameterType.Text&lt;/STRONG&gt; would have &lt;STRONG&gt;GetSpecTypeId() == SpecTypeId.Number&lt;/STRONG&gt;.&lt;/LI&gt;&lt;LI&gt;Revit 2022 deprecated the &lt;STRONG&gt;ParameterType&lt;/STRONG&gt; property and the &lt;STRONG&gt;GetSpecTypeId()&lt;/STRONG&gt; method, replacing them both with the &lt;STRONG&gt;GetDataType()&lt;/STRONG&gt; method. A parameter with &lt;STRONG&gt;ParameterType.Text&lt;/STRONG&gt; will report &lt;STRONG&gt;GetDataType() == SpecTypeId.String.Text&lt;/STRONG&gt;. Side note: The &lt;STRONG&gt;GetDataType()&lt;/STRONG&gt; method can also return a category identifier, indicating a Family Type parameter of that category.&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 12 Apr 2021 14:13:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10231439#M26728</guid>
      <dc:creator>david_becroft</dc:creator>
      <dc:date>2021-04-12T14:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10231758#M26729</link>
      <description>&lt;P&gt;Useful information. Thanks a lot!&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 15:44:15 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10231758#M26729</guid>
      <dc:creator>architect.bim</dc:creator>
      <dc:date>2021-04-12T15:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10237173#M26730</link>
      <description>&lt;P&gt;Thank you for the great explanation. Shared here for posterity:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://thebuildingcoder.typepad.com/blog/2021/04/pdf-export-forgetypeid-and-multi-target-add-in.html#2" target="_blank"&gt;https://thebuildingcoder.typepad.com/blog/2021/04/pdf-export-forgetypeid-and-multi-target-add-in.html#2&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Apr 2021 10:28:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10237173#M26730</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2021-04-14T10:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10247574#M26731</link>
      <description>&lt;P&gt;Thanx 2² the great previous answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As a last question: What would &lt;EM&gt;&lt;STRONG&gt;ParameterType.Invalid&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt; be the equivalent of?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Apr 2021 01:14:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10247574#M26731</guid>
      <dc:creator>peter_sylvester</dc:creator>
      <dc:date>2021-04-18T01:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10248670#M26732</link>
      <description>&lt;P&gt;You're very welcome! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ParameterTypeId.Invalid&lt;/STRONG&gt; is equivalent to an "empty" &lt;STRONG&gt;ForgeTypeId&lt;/STRONG&gt; object. You can check if a &lt;STRONG&gt;ForgeTypeId&lt;/STRONG&gt; is empty using its &lt;STRONG&gt;Empty()&lt;/STRONG&gt; method and you can construct an empty one with the default constructor: &lt;STRONG&gt;new ForgeTypeId()&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Apr 2021 18:52:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10248670#M26732</guid>
      <dc:creator>david_becroft</dc:creator>
      <dc:date>2021-04-18T18:52:02Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10258596#M26733</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5566034"&gt;@david_becroft&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Hi&lt;BR /&gt;Do you know what's the replacement SpecTypeId for ParameterType.FamilyType?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 06:29:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10258596#M26733</guid>
      <dc:creator>dev</dc:creator>
      <dc:date>2021-04-22T06:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10260155#M26734</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Strictly speaking, there isn't a &lt;STRONG&gt;SpecTypeId&lt;/STRONG&gt; property that directly replaces &lt;STRONG&gt;ParameterType.FamilyType&lt;/STRONG&gt;. This neighborhood of the API has changed a little bit.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let's say you have a parameter's &lt;STRONG&gt;Definition&lt;/STRONG&gt; object and you call its &lt;STRONG&gt;GetDataType()&lt;/STRONG&gt; method....&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;For Family Type parameters, &lt;STRONG&gt;GetDataType()&lt;/STRONG&gt; returns the identifier of the associated category. Use &lt;STRONG&gt;Category.IsBuiltInCategory(ForgeTypeId)&lt;/STRONG&gt; to detect a category identifier.&lt;/LI&gt;&lt;LI&gt;For parameters associated with units of measurement, &lt;STRONG&gt;GetDataType()&lt;/STRONG&gt; returns a measurable spec identifier. Use &lt;STRONG&gt;UnitUtils.IsMeasurableSpec(ForgeTypeId)&lt;/STRONG&gt; to detect a measurable spec identifier.&lt;/LI&gt;&lt;LI&gt;For all other parameters, &lt;STRONG&gt;GetDataType()&lt;/STRONG&gt; returns a spec identifier. Use &lt;STRONG&gt;Parameter.IsSpec(ForgeTypeId)&lt;/STRONG&gt; to detect a spec identifier, including measurable specs.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;(Use &lt;STRONG&gt;Parameter.IsValidDataType(ForgeTypeId)&lt;/STRONG&gt; to detect any parameter data type identifier – i.e., any measurable or non-measurable spec or category.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the other hand, let's say you want to &lt;EM&gt;create&lt;/EM&gt; a Family Type shared parameter. To create a Family Type shared parameter of a given category, you can construct an &lt;STRONG&gt;ExternalDefinitionCreationOptions&lt;/STRONG&gt; with that category's&amp;nbsp;&lt;STRONG&gt;ForgeTypeId&lt;/STRONG&gt; identifier. So where do you get the category identifier as a &lt;STRONG&gt;ForgeTypeId&lt;/STRONG&gt;? You would probably expect to find a &lt;STRONG&gt;CategoryTypeId&lt;/STRONG&gt; class similar to &lt;STRONG&gt;SpecTypeId&lt;/STRONG&gt; or &lt;STRONG&gt;UnitTypeId&lt;/STRONG&gt;. Well, there isn't a &lt;STRONG&gt;CategoryTypeId&lt;/STRONG&gt; class in Revit 2022, but you can use these two functions to exchange a &lt;STRONG&gt;BuiltInCategory&lt;/STRONG&gt; enumeration value for the equivalent &lt;STRONG&gt;ForgeTypeId&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Category.GetBuiltInCategoryTypeId(BuiltInCategory)&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Category.GetBuiltInCategory(ForgeTypeId)&lt;/STRONG&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2021 15:59:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10260155#M26734</guid>
      <dc:creator>david_becroft</dc:creator>
      <dc:date>2021-04-22T15:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10263035#M26735</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5566034"&gt;@david_becroft&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks for the quick and elaborate answer. It is very helpful. To check if I understand correctly, for example for this method from family manager, which previously used BuiltInParameterGroup and ParameterType.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;public FamilyParameter AddParameter(string parameterName, ForgeTypeId groupTypeId, ForgeTypeId specTypeId, bool isInstance);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a (pre-revit 2022) parameter type of ParameterType.FamilyType, now I would have to know upfront the built in category (builtInCategory) of the family that will go there, and pass instead to&amp;nbsp;specTypeId&amp;nbsp;&lt;STRONG&gt;Category.GetBuiltInCategoryTypeId(builtInCategory)&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 14:05:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10263035#M26735</guid>
      <dc:creator>dev</dc:creator>
      <dc:date>2021-04-23T14:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10263541#M26736</link>
      <description>&lt;P&gt;Good morning &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/82440"&gt;@dev&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Prior to Revit 2022, the&amp;nbsp;&lt;STRONG&gt;FamilyManager&lt;/STRONG&gt; class had:&lt;/P&gt;&lt;P&gt;(1)&lt;STRONG&gt; FamilyParameter AddParameter(string, BuiltInParameterGroup, ParameterType, bool)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Calling this function with &lt;STRONG&gt;ParameterType.FamilyType&lt;/STRONG&gt; would give an &lt;STRONG&gt;ArgumentException&lt;/STRONG&gt; saying "Cannot create family type parameter with this method." But you could add a Family Type parameter with this overload:&lt;/P&gt;&lt;P&gt;(2)&lt;STRONG&gt; FamilyParameter AddParameter(string, BuiltInParameterGroup, Category, bool)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In Revit 2022, the &lt;STRONG&gt;FamilyManager&lt;/STRONG&gt; class deprecates overload (1) and now offers this overload as a replacement:&lt;/P&gt;&lt;P&gt;(3) &lt;STRONG&gt;FamilyParameter AddParameter(string, ForgeTypeId group, ForgeTypeId spec, bool)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its behavior is basically unchanged. The "spec" argument to overload (3) only accepts spec identifiers, not category identifiers, so we will still use overload (2) above accepting &lt;STRONG&gt;Category&lt;/STRONG&gt; to add a Family Type parameter. I hope that helps!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 17:23:46 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10263541#M26736</guid>
      <dc:creator>david_becroft</dc:creator>
      <dc:date>2021-04-23T17:23:46Z</dc:date>
    </item>
    <item>
      <title>Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10268598#M26737</link>
      <description>&lt;P&gt;Link to related thread:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/revit-api-forum/convert-parametertype-fixtureunit-to-forgetypeid/m-p/10268587" target="_blank"&gt;https://forums.autodesk.com/t5/revit-api-forum/convert-parametertype-fixtureunit-to-forgetypeid/m-p/10268587&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In it,&amp;nbsp;&lt;SPAN&gt;Mark De Vries&amp;nbsp;&lt;/SPAN&gt;raises a question on how to handle&amp;nbsp;ParameterType.FixtureUnit and shares a class to encapsulate the handling of the the new and old methods in one place.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 12:25:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10268598#M26737</guid>
      <dc:creator>jeremy_tammik</dc:creator>
      <dc:date>2021-04-26T12:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10269000#M26738</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm starting to understand ParameterType in SpecTypeId and thanks for the explanations.&lt;/P&gt;&lt;P&gt;But I can't figure out how builtInParameterGroup: INVALID in GroupTypeId. The Invalid therme doesn't exist!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample&amp;nbsp;:&lt;/P&gt;&lt;P&gt;.. FamilyManager-&amp;gt;AddParameter("SAMPLE",&lt;STRONG&gt; BuiltInParameterGroup::INVALID&lt;/STRONG&gt;, ParameterType::HVACThermalConductivity, false);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to understand how I can pass this line of code into API Revit 2022?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for your reply.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Apr 2021 14:31:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10269000#M26738</guid>
      <dc:creator>autodesk.ID.fisa</dc:creator>
      <dc:date>2021-04-26T14:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10269246#M26739</link>
      <description>&lt;P&gt;Good morning &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/3302626"&gt;@autodesk.ID.fisa&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Great question! &lt;STRONG&gt;BuiltInParameterGroup.INVALID&lt;/STRONG&gt; is equivalent to an empty &lt;STRONG&gt;ForgeTypeId&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given a call like:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;FamilyManager-&amp;gt;AddParameter("SAMPLE",&lt;STRONG&gt; BuiltInParameterGroup::INVALID&lt;/STRONG&gt;, &lt;STRONG&gt;ParameterType::HVACThermalConductivity&lt;/STRONG&gt;, false);&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;In Revit 2022 we can instead write:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;FamilyManager-&amp;gt;AddParameter("SAMPLE", &lt;STRONG&gt;new ForgeTypeId()&lt;/STRONG&gt;, &lt;STRONG&gt;SpecTypeId::ThermalConductivity&lt;/STRONG&gt;, false);&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Mon, 26 Apr 2021 16:14:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10269246#M26739</guid>
      <dc:creator>david_becroft</dc:creator>
      <dc:date>2021-04-26T16:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10271815#M26740</link>
      <description>&lt;P&gt;Hello David,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You have to know, I would never have thought of that.&lt;/P&gt;&lt;P&gt;Thank you for your answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If we look at the other explanations, I would have been inclined to write this (as it is a group we define):&lt;/P&gt;&lt;P&gt;FamilyManager-&amp;gt;AddParameter ("SAMPLE", gcnew GroupTypeId(), SpecTypeId::ThermalConductivity, false);&lt;/P&gt;&lt;P&gt;Too bad this does not work and GroupTypeId does not inherit ForgeTypeId.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you again for your answer which corresponds exactly to what I was looking for.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Apr 2021 13:00:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10271815#M26740</guid>
      <dc:creator>autodesk.ID.fisa</dc:creator>
      <dc:date>2021-04-27T13:00:45Z</dc:date>
    </item>
    <item>
      <title>Re: Revit 2022: ParameterType.Text to ForgeTypeId</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10750836#M26741</link>
      <description>&lt;P&gt;Thank you for the prompt response and explanations.&lt;/P&gt;&lt;P&gt;If I have understood correctly the amendments to my code would look like the following:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Pre 2022: ParameterType spParmType = spFamilyListItem.DataType;
2022 Code: ForgeTypeId spParmType = spFamilyListItem.DataType;


Pre 2022: ExternalDefinitionCreationOptions option = new ExternalDefinitionCreationOptions(string, ParameterType);
2022 Code: ExternalDefinitionCreationOptions option = new ExternalDefinitionCreationOptions(string, ForgeTypeId)


Pre 2022: ParameterType spParamTypeNoFamily = definition.ParameterType;
2022 Code: ForgeTypeId spParamTypeNoFamily = Definition.GetDataType();


Pre 2022: DataType = familyParameter.Definition.ParameterType,
2022 Code: DataType = familyParameter.Definition. GetDataType();


Pre 2022: if (ParameterType.YesNo == fp.Definition.ParameterType)
2022 Code: if (SpecTypeId.Boolean.YesNo == fp.Definition.GetDataType())


Pre 2022:  if (def.ParameterType == ParameterType.FamilyType)
2022 Code:  if (!Category.IsBuiltInCategory(def.GetDataType()))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again thanks for the assistance.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Nov 2021 14:42:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/revit-2022-parametertype-text-to-forgetypeid/m-p/10750836#M26741</guid>
      <dc:creator>stephen_harrison</dc:creator>
      <dc:date>2021-11-11T14:42:37Z</dc:date>
    </item>
  </channel>
</rss>

