<?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: How to add new parameters to elements in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11633567#M14926</link>
    <description>&lt;P&gt;Presumably that is&amp;nbsp;GroupTypeId.IdentityData they are all listed in the RevitAPI.chm in English under GroupTypeId.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you wanted them in another language you could build a list for your reference via&amp;nbsp;LabelUtils.GetLabelForGroup with Revit set to that language.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ParameterUtils.GetAllBuiltInGroups&lt;/P&gt;</description>
    <pubDate>Wed, 21 Dec 2022 09:19:12 GMT</pubDate>
    <dc:creator>RPTHOMAS108</dc:creator>
    <dc:date>2022-12-21T09:19:12Z</dc:date>
    <item>
      <title>How to add new parameters to elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11632168#M14923</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to add a new parameter to an element (an family instance in this case). First of all, is it possible to add the parameter only to the element and not for the whole family ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to add a new parameter to a family called "family" using the below code but it does not work. I get "Parameter type is not accessible..."&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="igorbarcelosC54YD_0-1671552938640.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1154606iC69EF01F50FC40B6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="igorbarcelosC54YD_0-1671552938640.png" alt="igorbarcelosC54YD_0-1671552938640.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Document famdoc = Doc.EditFamily(family);&lt;/P&gt;&lt;P&gt;using (Transaction t = new Transaction(famdoc, "CreateParameters"))&lt;BR /&gt;{&lt;BR /&gt;t.Start();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FamilyParameter FamParam = famdoc.FamilyManager.AddParameter("My Parameter", BuiltInParameterGroup.PG_DATA, ParameterType.Text, true);&lt;BR /&gt;&lt;BR /&gt;t.Commit();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas why this approach does not work ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 16:18:38 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11632168#M14923</guid>
      <dc:creator>igor.barcelosC54YD</dc:creator>
      <dc:date>2022-12-20T16:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to add new parameters to elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11632295#M14924</link>
      <description>&lt;P&gt;If added in the Family they are applicable to the entire family i.e. either as Instance or Type parameters. So in the project all elements of that family will have those parameters.&lt;/P&gt;&lt;P&gt;In the project Parameters can be bound to categories instead and as such all elements of a certain category will have those parameters either as Instance or Type parameters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ParameterType was removed in 2023, so is now not accessible from outside the assembly. The message indicates it still exists but is not accessible.&lt;/P&gt;&lt;P&gt;You need to use the method that uses ForgeTypeIds.&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;FamilyManager.AddParameter("Param Name", GroupTypeId.Data, SpecTypeId.String.Text, true)&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 17:08:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11632295#M14924</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2022-12-20T17:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to add new parameters to elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11633519#M14925</link>
      <description>&lt;P&gt;Hello, thanks a lot for your response.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have another question. Let's say that a I need to add a new parameter to "Donnes d'intification". How can I get the&amp;nbsp;&lt;SPAN&gt;ForgeTypeId for this case ?&amp;nbsp;&lt;/SPAN&gt;&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="igorbarcelosC54YD_0-1671612535534.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1154828i86CA756AA1F2EADA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="igorbarcelosC54YD_0-1671612535534.png" alt="igorbarcelosC54YD_0-1671612535534.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 08:49:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11633519#M14925</guid>
      <dc:creator>igor.barcelosC54YD</dc:creator>
      <dc:date>2022-12-21T08:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to add new parameters to elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11633567#M14926</link>
      <description>&lt;P&gt;Presumably that is&amp;nbsp;GroupTypeId.IdentityData they are all listed in the RevitAPI.chm in English under GroupTypeId.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you wanted them in another language you could build a list for your reference via&amp;nbsp;LabelUtils.GetLabelForGroup with Revit set to that language.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ParameterUtils.GetAllBuiltInGroups&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 09:19:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11633567#M14926</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2022-12-21T09:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to add new parameters to elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11633720#M14927</link>
      <description>&lt;P&gt;Hi, thanks for your response. So I have tried the below code but I does not work, the new parameter "teste" is not added, no errors messages. Maybe because of the language&amp;nbsp; or its missing something in the code ?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Document famdoc = Doc.EditFamily(family);&lt;BR /&gt;FamilyManager familyMgr = famdoc.FamilyManager;&lt;BR /&gt;try&lt;BR /&gt;{&lt;BR /&gt;using (Transaction t = new Transaction(famdoc, "CreateParameters"))&lt;BR /&gt;{&lt;BR /&gt;MessageBox.Show("ADDING NEW PARAMETER" + family.Name);&lt;BR /&gt;t.Start();&lt;BR /&gt;FamilyParameter FamParam = familyMgr.AddParameter("teste", GroupTypeId.IdentityData, SpecTypeId.String.Text, true);&lt;BR /&gt;t.Commit();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt;catch(Exception error)&lt;BR /&gt;{&lt;BR /&gt;MessageBox.Show("My eror is " + error.Message);&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 10:47:44 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11633720#M14927</guid>
      <dc:creator>igor.barcelosC54YD</dc:creator>
      <dc:date>2022-12-21T10:47:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to add new parameters to elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11633735#M14928</link>
      <description>&lt;P&gt;Have you set the CurrentType in the FamilyManager? Unlike in the UI you need a default type in the API to define family parameters (even instance parameters).&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 10:56:23 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11633735#M14928</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2022-12-21T10:56:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to add new parameters to elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11633768#M14929</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No, I don't think I did. Could you walk me trough the necessary code ?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 11:14:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11633768#M14929</guid>
      <dc:creator>igor.barcelosC54YD</dc:creator>
      <dc:date>2022-12-21T11:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to add new parameters to elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11633779#M14930</link>
      <description>&lt;P&gt;FamilyManager.CurrentType is a property that can be assigned a FamilyType.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If there are no FamilyType objects in the Document (FamilyManager.Types) then you have to create one (FamilyManager.NewType). If you use NewType then it will make that new type created the current type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you refer to RevitAPI.chm for FamilyManager.NewType then that has an example in C#. In that example it is assumed "2X2" doesn't already exist, in reality you should first check if a named type you are adding already exists. As it is the example is one of those: it'll work first time but perhaps not the second time code examples.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 13:01:25 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11633779#M14930</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2022-12-21T13:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to add new parameters to elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11633828#M14931</link>
      <description>&lt;P&gt;I have tried&amp;nbsp; the below code from this post : &lt;A href="https://forums.autodesk.com/t5/revit-api-forum/how-to-use-forgetypeid-to-add-family-parameters-to-a-family-in/td-p/11591733" target="_blank" rel="noopener"&gt;https://forums.autodesk.com/t5/revit-api-forum/how-to-use-forgetypeid-to-add-family-parameters-to-a-family-in/td-p/11591733&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still does not work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;using (Transaction t = new Transaction(famdoc, "CreateParameters"))&lt;BR /&gt;{&lt;BR /&gt;MessageBox.Show("ADDING NEW PARAMETER" + family.Name);&lt;BR /&gt;t.Start();&lt;/P&gt;&lt;P&gt;FamilyParameter CedWorksetParameter = familyMgr.AddParameter("CedWorkset", GroupTypeId.Data, SpecTypeId.String.Text, true); //An instance parameter&lt;BR /&gt;FamilyParameter CedFamilyTypeParameter = familyMgr.AddParameter("CedFamilyType", GroupTypeId.Data, SpecTypeId.String.Text, false); //Not an instance parameter&lt;/P&gt;&lt;P&gt;FamilyTypeSet familyTypes = familyMgr.Types;&lt;BR /&gt;FamilyTypeSetIterator familyTypesItor = familyTypes.ForwardIterator();&lt;BR /&gt;familyTypesItor.Reset();&lt;BR /&gt;while (familyTypesItor.MoveNext())&lt;BR /&gt;{&lt;BR /&gt;FamilyType familyType = familyTypesItor.Current as FamilyType;&lt;BR /&gt;familyMgr.CurrentType = familyType;&lt;BR /&gt;familyMgr.Set(CedWorksetParameter, "Refrigeration");&lt;BR /&gt;familyMgr.Set(CedFamilyTypeParameter, "Refrigeration");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;t.Commit();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 11:48:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11633828#M14931</guid>
      <dc:creator>igor.barcelosC54YD</dc:creator>
      <dc:date>2022-12-21T11:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to add new parameters to elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11633844#M14932</link>
      <description>&lt;P&gt;The order is wrong, you have to set FamilyManager.CurrentType first before anything else (even for adding modifying instance parameters).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In that example they may have had types already defined. Hence they may find it doesn't work in some scenarios, true understanding is more than just copying code. The limitation of the FamilyManager is that the CurrentType needs to be set to something before you can do anything with it (sometimes it may already have a value set whilst at other times it will not e.g. when there are no types defined in the family document).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is a limitation with the API object that doesn't exist in the UI, it is just the way they made it unfortunately.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The code in that post was probably copied from elsewhere without them understanding the mechanism involved with the FamilyManager at the time and now it is being copied a second time. Yes it fixed their issue but they went away still not understanding how it works sadly (otherwise they would have ensured the CurrentType was set first). In fairness it didn't occur to me at the time either that they may be lacking that insight.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 12:16:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11633844#M14932</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2022-12-21T12:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to add new parameters to elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11634074#M14933</link>
      <description>&lt;P&gt;Hi, sorry if I get this wrong but I have only one type in my familly (called "OA-O" see below image).&amp;nbsp;&lt;/P&gt;&lt;P&gt;I set the only type as CurrentType inside the While and then I set the parameters. Don't know why this does not work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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="igorbarcelosC54YD_0-1671628629166.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1154926iF197E1AAFC9F10A2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="igorbarcelosC54YD_0-1671628629166.png" alt="igorbarcelosC54YD_0-1671628629166.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="igorbarcelosC54YD_1-1671628677610.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1154927i388BDF544727BD6F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="igorbarcelosC54YD_1-1671628677610.png" alt="igorbarcelosC54YD_1-1671628677610.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 13:18:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11634074#M14933</guid>
      <dc:creator>igor.barcelosC54YD</dc:creator>
      <dc:date>2022-12-21T13:18:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to add new parameters to elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11634462#M14934</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 16:10:22 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11634462#M14934</guid>
      <dc:creator>guillaume.cassin2GQKV</dc:creator>
      <dc:date>2022-12-21T16:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to add new parameters to elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11634474#M14935</link>
      <description>&lt;P&gt;I'm quitte new to Revit so i have tried to add a new parameter manullay and I dont even see option to do it, like "New Parameter".&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideias why ?&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="igorbarcelosC54YD_0-1671639144512.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1155017i32835A2CD62CFDB6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="igorbarcelosC54YD_0-1671639144512.png" alt="igorbarcelosC54YD_0-1671639144512.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 16:12:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11634474#M14935</guid>
      <dc:creator>igor.barcelosC54YD</dc:creator>
      <dc:date>2022-12-21T16:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to add new parameters to elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11634516#M14936</link>
      <description>&lt;P&gt;To use FamilyManager you need to be in a Family document (Document.IsFamilyDocument = true).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you want to add parameters in the project then that is a separate process via category bindings.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 17:07:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11634516#M14936</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2022-12-21T17:07:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to add new parameters to elements</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11635884#M14937</link>
      <description>&lt;P&gt;Ok, problem solved. Thanks a lot for your help !!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 08:33:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/how-to-add-new-parameters-to-elements/m-p/11635884#M14937</guid>
      <dc:creator>igor.barcelosC54YD</dc:creator>
      <dc:date>2022-12-22T08:33:59Z</dc:date>
    </item>
  </channel>
</rss>

