<?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 the same component multiple times using ilogic in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-the-same-component-multiple-times-using-ilogic/m-p/9229799#M109433</link>
    <description>&lt;P&gt;Try this code, this will insert the component and name it as if it were inserted manually.&lt;/P&gt;&lt;PRE&gt;Dim ComponentA = Components.Add("", "partA.ipt", position := pointA, grounded := True, visible := True, appearance := Nothing)&lt;/PRE&gt;</description>
    <pubDate>Fri, 03 Jan 2020 18:16:40 GMT</pubDate>
    <dc:creator>andrewiv</dc:creator>
    <dc:date>2020-01-03T18:16:40Z</dc:date>
    <item>
      <title>How to add the same component multiple times using ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-the-same-component-multiple-times-using-ilogic/m-p/9229504#M109432</link>
      <description>&lt;DIV class="lia-message-subject lia-component-message-view-widget-subject"&gt;&lt;DIV class="MessageSubject"&gt;&lt;SPAN style="font-family: inherit;"&gt;Hi, I will try to make this as clear as possible. Basically, I want to be able to be able to add the same component multiple times in an assembly using ilogic. When done manually with "place" command, if Inventor recognizes the same part/component being added more than once it adds ":2" at the end of its name, then ":3" and so on.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;&lt;DIV class="lia-message-body-content"&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So here is my issue, I can add parts/components to assemblies, however, whenever I add the same one, because it has the same name as a previously added part/component, then it deletes the initial one in order to place the new one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I tell ilogic that if I have the same part/component already in an assembly to simple add the ":2" or ":3" and so on?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is an example of what I do to add a new component:&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Dim&lt;/SPAN&gt; &lt;SPAN&gt;ComponentA&lt;/SPAN&gt; = &lt;SPAN&gt;Components&lt;/SPAN&gt;.&lt;SPAN&gt;Add&lt;/SPAN&gt;(&lt;SPAN&gt;"partA"&lt;/SPAN&gt;, &lt;SPAN&gt;"partA.ipt&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;, &lt;SPAN&gt;position&lt;/SPAN&gt; := &lt;SPAN&gt;pointA&lt;/SPAN&gt;, &lt;SPAN&gt;grounded&lt;/SPAN&gt; := &lt;SPAN&gt;True&lt;/SPAN&gt;, &lt;SPAN&gt;visible&lt;/SPAN&gt; := &lt;SPAN&gt;True&lt;/SPAN&gt;, &lt;SPAN&gt;appearance&lt;/SPAN&gt; := &lt;SPAN&gt;Nothing&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;Note : this is all part of an "if" "then" statement so it may happen that "partA" appears again because the excel spreadsheet I use to determine which part to add satisfies that statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for your help&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 03 Jan 2020 15:34:51 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-the-same-component-multiple-times-using-ilogic/m-p/9229504#M109432</guid>
      <dc:creator>tgrenierJA998</dc:creator>
      <dc:date>2020-01-03T15:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the same component multiple times using ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-the-same-component-multiple-times-using-ilogic/m-p/9229799#M109433</link>
      <description>&lt;P&gt;Try this code, this will insert the component and name it as if it were inserted manually.&lt;/P&gt;&lt;PRE&gt;Dim ComponentA = Components.Add("", "partA.ipt", position := pointA, grounded := True, visible := True, appearance := Nothing)&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Jan 2020 18:16:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-the-same-component-multiple-times-using-ilogic/m-p/9229799#M109433</guid>
      <dc:creator>andrewiv</dc:creator>
      <dc:date>2020-01-03T18:16:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to add the same component multiple times using ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-the-same-component-multiple-times-using-ilogic/m-p/9230035#M109434</link>
      <description>&lt;P&gt;I can't believe it was so simple!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much and have a great day!&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2020 19:58:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/how-to-add-the-same-component-multiple-times-using-ilogic/m-p/9230035#M109434</guid>
      <dc:creator>tgrenierJA998</dc:creator>
      <dc:date>2020-01-03T19:58:37Z</dc:date>
    </item>
  </channel>
</rss>

