<?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: Set AssemblyInstance.Name on creation in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/set-assemblyinstance-name-on-creation/m-p/7804293#M52176</link>
    <description>&lt;P&gt;So I tried it when I was creating the Assembly, and then later in a separate transaction.&amp;nbsp; Neither worked...&amp;nbsp; BUT - both Transactions were in a GroupTransaction...&amp;nbsp; So maybe I need to do it after the GroupTransaction is commited, because technically the Assembly still didn't exist when I was trying to rename it in the 2nd Transaction of the GroupTransaction????&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm gonna give it a shot.&amp;nbsp; Hopefully you're right!!!&lt;/P&gt;</description>
    <pubDate>Fri, 23 Feb 2018 19:44:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-02-23T19:44:56Z</dc:date>
    <item>
      <title>Set AssemblyInstance.Name on creation</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/set-assemblyinstance-name-on-creation/m-p/7800918#M52173</link>
      <description>&lt;P&gt;I've written a tool that expands on the creation of &lt;STRONG&gt;AssemblyInstances&lt;/STRONG&gt;.&amp;nbsp; The problem that I'm encountering now is that I want users to be able to set the name during the process.&amp;nbsp; The native Revit function does this:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Untitled.png" style="width: 340px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/466444i877CF9E201A79314/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm pretty much trying to replicate it without the combobox, as I already grab the naming category prior.&amp;nbsp; I've already created the dialog, which take the user input for the string.&amp;nbsp; It's stored statically, so if they've created &lt;STRONG&gt;AssemblyInstances&lt;/STRONG&gt; with it before, we will have the naming convention.&amp;nbsp; Questions are:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;If this is the first &lt;STRONG&gt;AssemblyInstance&lt;/STRONG&gt; they're creating, is there a way to pull the native Revit naming convention based on the &lt;EM&gt;Category.Id&lt;/EM&gt; ?&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;I've tried setting the &lt;STRONG&gt;AssemblyInstance.Name&lt;/STRONG&gt;, which has both a &lt;EM&gt;get&lt;/EM&gt; and &lt;EM&gt;set&lt;/EM&gt;, and I get the following error:&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;&lt;STRONG&gt;"This element does not support assignment of a user-specified name."&lt;/STRONG&gt;&lt;/EM&gt;&lt;/LI&gt;&lt;LI&gt;I've tried setting this both inside the initial &lt;EM&gt;Transaction&lt;/EM&gt; when I'm creating the &lt;STRONG&gt;AssmeblyInstance&lt;/STRONG&gt;, and in a following one where I'm setting other shared parameters - I get the same result.&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;What am I missing here?&amp;nbsp; What do I need to do to accomplish this?&amp;nbsp; Thanks!!!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Feb 2018 19:21:06 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/set-assemblyinstance-name-on-creation/m-p/7800918#M52173</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-22T19:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Set AssemblyInstance.Name on creation</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/set-assemblyinstance-name-on-creation/m-p/7802514#M52174</link>
      <description>&lt;P&gt;The get and set operations are inherited from the base class Element.Name property.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can set the name on many Revit elements.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Apparently, on the&amp;nbsp;&lt;STRONG&gt;AssemblyInstance, you cannot.&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Cheers,&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Jeremy&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 10:01:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/set-assemblyinstance-name-on-creation/m-p/7802514#M52174</guid>
      <dc:creator>jeremytammik</dc:creator>
      <dc:date>2018-02-23T10:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set AssemblyInstance.Name on creation</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/set-assemblyinstance-name-on-creation/m-p/7804102#M52175</link>
      <description>&lt;P&gt;Perhaps you need to commit your transaction prior to renaming the assembly. An assembly which does not exist cannot be renamed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a routine which renames assemblyinstances so it is possible to rename them.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 18:51:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/set-assemblyinstance-name-on-creation/m-p/7804102#M52175</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-23T18:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set AssemblyInstance.Name on creation</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/set-assemblyinstance-name-on-creation/m-p/7804293#M52176</link>
      <description>&lt;P&gt;So I tried it when I was creating the Assembly, and then later in a separate transaction.&amp;nbsp; Neither worked...&amp;nbsp; BUT - both Transactions were in a GroupTransaction...&amp;nbsp; So maybe I need to do it after the GroupTransaction is commited, because technically the Assembly still didn't exist when I was trying to rename it in the 2nd Transaction of the GroupTransaction????&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm gonna give it a shot.&amp;nbsp; Hopefully you're right!!!&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 19:44:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/set-assemblyinstance-name-on-creation/m-p/7804293#M52176</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-23T19:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: Set AssemblyInstance.Name on creation</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/set-assemblyinstance-name-on-creation/m-p/7804382#M52177</link>
      <description>&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Untitled.png" style="width: 705px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/466988i29AFCD5E06B41A6B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Untitled.png" alt="Untitled.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe you could tell me how you're doing it...&amp;nbsp; Because I just keep hitting the same wall from a different vector...&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 20:10:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/set-assemblyinstance-name-on-creation/m-p/7804382#M52177</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-02-23T20:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set AssemblyInstance.Name on creation</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/set-assemblyinstance-name-on-creation/m-p/7804616#M52178</link>
      <description>&lt;P&gt;As &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/413917"&gt;@jeremytammik&lt;/a&gt;&amp;nbsp;said class .name is inherited from Element but luckily they have reinvented the wheel for you:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So you want&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AssemblyInstance.AssemblyTypeName&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A&amp;nbsp;trick I've learned in terms of avoiding inherited members&amp;nbsp;is to read the 'Methods' and 'Properties' branches of the item within the&amp;nbsp;.chm file rather than the 'Members' branch. Not sure why they list everything in 'Members', if you wanted&amp;nbsp;a member which is&amp;nbsp;inherited then you wouldn't cast to a more specific type. Is probably auto generated to a certain degree.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You may also ask: why is this property not on the AssemblyType class which seems pretty barren in terms of its own properties and methods (I would not know the answer).&lt;/P&gt;</description>
      <pubDate>Fri, 23 Feb 2018 21:43:00 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/set-assemblyinstance-name-on-creation/m-p/7804616#M52178</guid>
      <dc:creator>RPTHOMAS108</dc:creator>
      <dc:date>2018-02-23T21:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set AssemblyInstance.Name on creation</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/set-assemblyinstance-name-on-creation/m-p/13399027#M52179</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I have been working in Revit 2024 and encountered the same issue. I am relatively new to the Revit API, but I believe that in order to modify assembly properties (such as the name), the object must first be created—at least, that’s what worked for me.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2025 05:51:28 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/set-assemblyinstance-name-on-creation/m-p/13399027#M52179</guid>
      <dc:creator>jorge_herron</dc:creator>
      <dc:date>2025-03-31T05:51:28Z</dc:date>
    </item>
  </channel>
</rss>

