<?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: Changing the copied element in Revit API Forum</title>
    <link>https://forums.autodesk.com/t5/revit-api-forum/changing-the-copied-element/m-p/13094874#M2499</link>
    <description>&lt;P&gt;Hi, I'm sorry for the late reply.&lt;BR /&gt;yes, I am sure that the component type can be changed using the api, and no, it was not a code error.&lt;BR /&gt;in fact, it was just necessary to use BuiltinParameter.LEGEND_COMPONENT as written TripleM-Dev.net see the answers below.&lt;BR /&gt;I am grateful to you for your time. Good luck)&lt;/P&gt;</description>
    <pubDate>Sat, 19 Oct 2024 10:50:31 GMT</pubDate>
    <dc:creator>will_smith3691215</dc:creator>
    <dc:date>2024-10-19T10:50:31Z</dc:date>
    <item>
      <title>Changing the copied element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/changing-the-copied-element/m-p/13088786#M2496</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;hi&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;my&lt;/SPAN&gt; &lt;SPAN class=""&gt;task&lt;/SPAN&gt;&lt;SPAN&gt; is to &lt;/SPAN&gt;&lt;SPAN class=""&gt;create&lt;/SPAN&gt;&lt;SPAN&gt; a &lt;/SPAN&gt;&lt;SPAN class=""&gt;legend&lt;/SPAN&gt;&lt;SPAN&gt; by &lt;/SPAN&gt;&lt;SPAN class=""&gt;copying&lt;/SPAN&gt; &lt;SPAN class=""&gt;another&lt;/SPAN&gt;&lt;SPAN&gt; one &lt;/SPAN&gt;&lt;SPAN class=""&gt;and&lt;/SPAN&gt; &lt;SPAN class=""&gt;deleting&lt;/SPAN&gt; &lt;SPAN class=""&gt;all&lt;/SPAN&gt;&lt;SPAN&gt; the &lt;/SPAN&gt;&lt;SPAN class=""&gt;objects&lt;/SPAN&gt;&lt;SPAN&gt; from there &lt;/SPAN&gt;&lt;SPAN class=""&gt;(&lt;/SPAN&gt;&lt;SPAN class=""&gt;since&lt;/SPAN&gt;&lt;SPAN&gt; there are &lt;/SPAN&gt;&lt;SPAN class=""&gt;no&lt;/SPAN&gt; &lt;SPAN class=""&gt;ways&lt;/SPAN&gt;&lt;SPAN&gt; to &lt;/SPAN&gt;&lt;SPAN class=""&gt;create&lt;/SPAN&gt;&lt;SPAN&gt; a &lt;/SPAN&gt;&lt;SPAN class=""&gt;legend&lt;/SPAN&gt; &lt;SPAN class=""&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; the &lt;/SPAN&gt;&lt;SPAN class=""&gt;revit&lt;/SPAN&gt; &lt;SPAN class=""&gt;api&lt;/SPAN&gt; &lt;SPAN class=""&gt;yet&lt;/SPAN&gt;&lt;SPAN class=""&gt;)&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;I&lt;/SPAN&gt; &lt;SPAN class=""&gt;also&lt;/SPAN&gt; &lt;SPAN class=""&gt;need&lt;/SPAN&gt;&lt;SPAN&gt; to &lt;/SPAN&gt;&lt;SPAN class=""&gt;find&lt;/SPAN&gt; &lt;SPAN class=""&gt;all&lt;/SPAN&gt;&lt;SPAN&gt; the &lt;/SPAN&gt;&lt;SPAN class=""&gt;windows&lt;/SPAN&gt; &lt;SPAN class=""&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; the &lt;/SPAN&gt;&lt;SPAN class=""&gt;legend&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt; &lt;SPAN class=""&gt;then&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;I&lt;/SPAN&gt; &lt;SPAN class=""&gt;need&lt;/SPAN&gt;&lt;SPAN&gt; to &lt;/SPAN&gt;&lt;SPAN class=""&gt;copy&lt;/SPAN&gt; &lt;SPAN class=""&gt;any&lt;/SPAN&gt; &lt;SPAN class=""&gt;element&lt;/SPAN&gt;&lt;SPAN&gt; of &lt;/SPAN&gt;&lt;SPAN class=""&gt;any&lt;/SPAN&gt; &lt;SPAN class=""&gt;legend&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt; &lt;SPAN class=""&gt;paste&lt;/SPAN&gt; &lt;SPAN class=""&gt;it&lt;/SPAN&gt; &lt;SPAN class=""&gt;into&lt;/SPAN&gt;&lt;SPAN&gt; the &lt;/SPAN&gt;&lt;SPAN class=""&gt;newly&lt;/SPAN&gt; &lt;SPAN class=""&gt;created&lt;/SPAN&gt; &lt;SPAN class=""&gt;legend&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt; &lt;SPAN class=""&gt;change&lt;/SPAN&gt; &lt;SPAN class=""&gt;its&lt;/SPAN&gt; &lt;SPAN class=""&gt;type&lt;/SPAN&gt; &lt;SPAN class=""&gt;so&lt;/SPAN&gt;&lt;SPAN&gt; that &lt;/SPAN&gt;&lt;SPAN class=""&gt;this&lt;/SPAN&gt; &lt;SPAN class=""&gt;element&lt;/SPAN&gt; &lt;SPAN class=""&gt;becomes&lt;/SPAN&gt;&lt;SPAN&gt; a &lt;/SPAN&gt;&lt;SPAN class=""&gt;window&lt;/SPAN&gt; &lt;SPAN class=""&gt;from&lt;/SPAN&gt;&lt;SPAN&gt; the &lt;/SPAN&gt;&lt;SPAN class=""&gt;list&lt;/SPAN&gt;&lt;SPAN class=""&gt;;&lt;/SPAN&gt; &lt;SPAN class=""&gt;and&lt;/SPAN&gt; &lt;SPAN class=""&gt;change&lt;/SPAN&gt; &lt;SPAN class=""&gt;it&lt;/SPAN&gt; &lt;SPAN class=""&gt;so&lt;/SPAN&gt; &lt;SPAN class=""&gt;that&lt;/SPAN&gt; &lt;SPAN class=""&gt;it&lt;/SPAN&gt; &lt;SPAN class=""&gt;appears&lt;/SPAN&gt;&lt;SPAN&gt; in &lt;/SPAN&gt;&lt;SPAN class=""&gt;front&lt;/SPAN&gt;&lt;SPAN&gt; of &lt;/SPAN&gt;&lt;SPAN class=""&gt;us&lt;/SPAN&gt;&lt;SPAN&gt; with a &lt;/SPAN&gt;&lt;SPAN class=""&gt;front&lt;/SPAN&gt; &lt;SPAN class=""&gt;view&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt; &lt;SPAN class=""&gt;And&lt;/SPAN&gt; &lt;SPAN class=""&gt;so&lt;/SPAN&gt;&lt;SPAN&gt; you &lt;/SPAN&gt;&lt;SPAN class=""&gt;need&lt;/SPAN&gt;&lt;SPAN&gt; to &lt;/SPAN&gt;&lt;SPAN class=""&gt;repeat&lt;/SPAN&gt;&lt;SPAN&gt; as &lt;/SPAN&gt;&lt;SPAN class=""&gt;many&lt;/SPAN&gt; &lt;SPAN class=""&gt;times&lt;/SPAN&gt; &lt;SPAN class=""&gt;as&lt;/SPAN&gt;&lt;SPAN&gt; there are &lt;/SPAN&gt;&lt;SPAN class=""&gt;windows&lt;/SPAN&gt; &lt;SPAN class=""&gt;in&lt;/SPAN&gt;&lt;SPAN&gt; the &lt;/SPAN&gt;&lt;SPAN class=""&gt;list&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;SPAN&gt; The &lt;/SPAN&gt;&lt;SPAN class=""&gt;result&lt;/SPAN&gt; &lt;SPAN class=""&gt;should&lt;/SPAN&gt; &lt;SPAN class=""&gt;be&lt;/SPAN&gt;&lt;SPAN&gt; a &lt;/SPAN&gt;&lt;SPAN class=""&gt;new&lt;/SPAN&gt; &lt;SPAN class=""&gt;legend&lt;/SPAN&gt; &lt;SPAN class=""&gt;with&lt;/SPAN&gt; &lt;SPAN class=""&gt;all&lt;/SPAN&gt;&lt;SPAN&gt; the &lt;/SPAN&gt;&lt;SPAN class=""&gt;windows&lt;/SPAN&gt; &lt;SPAN class=""&gt;from&lt;/SPAN&gt;&lt;SPAN&gt; the &lt;/SPAN&gt;&lt;SPAN class=""&gt;document&lt;/SPAN&gt; &lt;SPAN class=""&gt;represented&lt;/SPAN&gt;&lt;SPAN&gt; by the &lt;/SPAN&gt;&lt;SPAN class=""&gt;front&lt;/SPAN&gt; &lt;SPAN class=""&gt;view&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN class=""&gt;Unfortunately&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;I&lt;/SPAN&gt;&lt;SPAN&gt;'m &lt;/SPAN&gt;&lt;SPAN class=""&gt;stuck&lt;/SPAN&gt; &lt;SPAN class=""&gt;halfway&lt;/SPAN&gt; &lt;SPAN class=""&gt;through&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt; &lt;SPAN class=""&gt;I&lt;/SPAN&gt; &lt;SPAN class=""&gt;copied&lt;/SPAN&gt;&lt;SPAN&gt; the &lt;/SPAN&gt;&lt;SPAN class=""&gt;found&lt;/SPAN&gt; &lt;SPAN class=""&gt;element&lt;/SPAN&gt; &lt;SPAN class=""&gt;into&lt;/SPAN&gt;&lt;SPAN&gt; a &lt;/SPAN&gt;&lt;SPAN class=""&gt;new&lt;/SPAN&gt; &lt;SPAN class=""&gt;legend&lt;/SPAN&gt; &lt;SPAN class=""&gt;and&lt;/SPAN&gt;&lt;SPAN&gt; do &lt;/SPAN&gt;&lt;SPAN class=""&gt;not&lt;/SPAN&gt; &lt;SPAN class=""&gt;know&lt;/SPAN&gt; &lt;SPAN class=""&gt;how&lt;/SPAN&gt; &lt;SPAN class=""&gt;to&lt;/SPAN&gt; &lt;SPAN class=""&gt;change&lt;/SPAN&gt;&lt;SPAN&gt; it&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;I&lt;/SPAN&gt;&lt;SPAN&gt; have been doing this for &lt;/SPAN&gt;&lt;SPAN class=""&gt;literally&lt;/SPAN&gt; &lt;SPAN class=""&gt;several&lt;/SPAN&gt; &lt;SPAN class=""&gt;weeks&lt;/SPAN&gt; &lt;SPAN class=""&gt;now&lt;/SPAN&gt; &lt;SPAN class=""&gt;and&lt;/SPAN&gt;&lt;SPAN&gt; have &lt;/SPAN&gt;&lt;SPAN class=""&gt;not&lt;/SPAN&gt;&lt;SPAN&gt; made &lt;/SPAN&gt;&lt;SPAN class=""&gt;any&lt;/SPAN&gt; &lt;SPAN class=""&gt;progress&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt; &lt;SPAN class=""&gt;I&lt;/SPAN&gt;&lt;SPAN&gt; am &lt;/SPAN&gt;&lt;SPAN class=""&gt;asking&lt;/SPAN&gt;&lt;SPAN&gt; for &lt;/SPAN&gt;&lt;SPAN class=""&gt;your&lt;/SPAN&gt; &lt;SPAN class=""&gt;help&lt;/SPAN&gt; &lt;SPAN class=""&gt;in&lt;/SPAN&gt; &lt;SPAN class=""&gt;this&lt;/SPAN&gt; &lt;SPAN class=""&gt;seemingly&lt;/SPAN&gt; &lt;SPAN class=""&gt;easy&lt;/SPAN&gt; &lt;SPAN class=""&gt;task&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt; &lt;SPAN class=""&gt;I&lt;/SPAN&gt;&lt;SPAN&gt; will &lt;/SPAN&gt;&lt;SPAN class=""&gt;attach&lt;/SPAN&gt; &lt;SPAN class=""&gt;my&lt;/SPAN&gt; &lt;SPAN class=""&gt;code&lt;/SPAN&gt; &lt;SPAN class=""&gt;below&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt;&lt;SPAN&gt; I will &lt;/SPAN&gt;&lt;SPAN class=""&gt;be&lt;/SPAN&gt; &lt;SPAN class=""&gt;grateful&lt;/SPAN&gt;&lt;SPAN&gt; for &lt;/SPAN&gt;&lt;SPAN class=""&gt;any&lt;/SPAN&gt; &lt;SPAN class=""&gt;hint&lt;/SPAN&gt; &lt;SPAN class=""&gt;and&lt;/SPAN&gt; &lt;SPAN class=""&gt;help&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;thank&lt;/SPAN&gt;&lt;SPAN&gt; you in &lt;/SPAN&gt;&lt;SPAN class=""&gt;advance&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt; &lt;SPAN class=""&gt;I&lt;/SPAN&gt;&lt;SPAN&gt; am &lt;/SPAN&gt;&lt;SPAN class=""&gt;not&lt;/SPAN&gt; &lt;SPAN class=""&gt;a&lt;/SPAN&gt; &lt;SPAN class=""&gt;native&lt;/SPAN&gt; &lt;SPAN class=""&gt;English&lt;/SPAN&gt; &lt;SPAN class=""&gt;speaker&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN class=""&gt;so&lt;/SPAN&gt;&lt;SPAN&gt; I &lt;/SPAN&gt;&lt;SPAN class=""&gt;can&lt;/SPAN&gt; &lt;SPAN class=""&gt;make&lt;/SPAN&gt; &lt;SPAN class=""&gt;various&lt;/SPAN&gt; &lt;SPAN class=""&gt;types&lt;/SPAN&gt;&lt;SPAN&gt; of &lt;/SPAN&gt;&lt;SPAN class=""&gt;mistakes&lt;/SPAN&gt;&lt;SPAN class=""&gt;,&lt;/SPAN&gt; &lt;SPAN class=""&gt;for&lt;/SPAN&gt; &lt;SPAN class=""&gt;which&lt;/SPAN&gt;&lt;SPAN&gt; I &lt;/SPAN&gt;&lt;SPAN class=""&gt;apologize&lt;/SPAN&gt;&lt;SPAN class=""&gt;.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 16:42:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/changing-the-copied-element/m-p/13088786#M2496</guid>
      <dc:creator>will_smith3691215</dc:creator>
      <dc:date>2024-10-16T16:42:17Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the copied element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/changing-the-copied-element/m-p/13089117#M2497</link>
      <description>&lt;P&gt;Have you verified you can do this manually? I was not aware you could show modeled elements in a Legend, but then i don't use Legends very often. Second, is it a code failure, or is it just not changing the element type?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 19:03:32 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/changing-the-copied-element/m-p/13089117#M2497</guid>
      <dc:creator>ctm_mka</dc:creator>
      <dc:date>2024-10-16T19:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the copied element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/changing-the-copied-element/m-p/13089118#M2498</link>
      <description>&lt;P&gt;Hi &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/16283772"&gt;@will_smith3691215&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As the specific parameters (attached to elements) used to do internal Revits "Stuff" isn't well documented use &lt;A href="https://github.com/jeremytammik/RevitLookup/releases" target="_blank" rel="noopener"&gt;RevitLookup&amp;nbsp;&lt;/A&gt;to inspect the elements and which parameters it that that (might) does what you need.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Looking into a LegendComponent, it's not a specific class, so no direct properties on the Class to use. (see: &lt;A href="https://www.revitapidocs.com" target="_blank" rel="noopener"&gt;https://www.revitapidocs.com&lt;/A&gt; )&lt;/P&gt;&lt;P&gt;So inspecting a placed LegendComponent reveals the following builtin parameters:&lt;/P&gt;&lt;P&gt;BuiltinParameter.LEGEND_COMPONENT, which is of the ElementId datatype and takes the Id of a Type (wall type etc..) to determine which family type to show&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BuiltinParameter.LEGEND_COMPONENT_VIEW, seems to be the one to determine the viewdirection, it's a integer type so change some Legendcomponents and see which value belongs to which direction (seems -5 = Section)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BuiltinParameter.LEGEND_COMPONENT_LENGTH, looks like this one controls the length of the component and is a double (length type).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- Michel&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Oct 2024 19:03:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/changing-the-copied-element/m-p/13089118#M2498</guid>
      <dc:creator>TripleM-Dev.net</dc:creator>
      <dc:date>2024-10-16T19:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the copied element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/changing-the-copied-element/m-p/13094874#M2499</link>
      <description>&lt;P&gt;Hi, I'm sorry for the late reply.&lt;BR /&gt;yes, I am sure that the component type can be changed using the api, and no, it was not a code error.&lt;BR /&gt;in fact, it was just necessary to use BuiltinParameter.LEGEND_COMPONENT as written TripleM-Dev.net see the answers below.&lt;BR /&gt;I am grateful to you for your time. Good luck)&lt;/P&gt;</description>
      <pubDate>Sat, 19 Oct 2024 10:50:31 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/changing-the-copied-element/m-p/13094874#M2499</guid>
      <dc:creator>will_smith3691215</dc:creator>
      <dc:date>2024-10-19T10:50:31Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the copied element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/changing-the-copied-element/m-p/13094881#M2500</link>
      <description>&lt;P&gt;Hi, you were right, thank you so much.&lt;BR /&gt;to change the parameter type, I used BuiltinParameter.LEGEND_COMPONENT and it worked. I implemented it like this:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;var parameter type = legendComponent.get_Parameter(BuiltInParameter.LEGEND_COMPONENT);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;parametertype.Set(windows Symbol Id);&lt;/FONT&gt;&lt;BR /&gt;Now I am faced with the task of changing the appearance of the object to: Facade : front. I use a similar code but it doesn't work:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;var parameter View = legendComponent.get_Parameter(BuiltInParameter.LEGEND_COMPONENT_VIEW);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;parametertype.Set(-7);&lt;/FONT&gt;&lt;BR /&gt;do you have any thoughts on this?&lt;/P&gt;</description>
      <pubDate>Sat, 19 Oct 2024 10:57:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/changing-the-copied-element/m-p/13094881#M2500</guid>
      <dc:creator>will_smith3691215</dc:creator>
      <dc:date>2024-10-19T10:57:50Z</dc:date>
    </item>
    <item>
      <title>Re: Changing the copied element</title>
      <link>https://forums.autodesk.com/t5/revit-api-forum/changing-the-copied-element/m-p/13094910#M2501</link>
      <description>&lt;P&gt;I'm sorry, I was inattentive and made a mistake. instead of "&lt;FONT face="courier new,courier"&gt;parameterView.Set(-7);&lt;/FONT&gt;" I used "&lt;FONT face="courier new,courier"&gt;parametertype.Set(-7);&lt;/FONT&gt;". after the correction, everything began to work as it should.&lt;/P&gt;</description>
      <pubDate>Sat, 19 Oct 2024 11:28:58 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/revit-api-forum/changing-the-copied-element/m-p/13094910#M2501</guid>
      <dc:creator>will_smith3691215</dc:creator>
      <dc:date>2024-10-19T11:28:58Z</dc:date>
    </item>
  </channel>
</rss>

