<?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 Add iAssembly through iLogic Rule in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-iassembly-through-ilogic-rule/m-p/9761066#M116202</link>
    <description>&lt;P&gt;I am trying to add an iAssembly through an iLogic Rule.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This the code I am using.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Components&lt;/SPAN&gt;.&lt;SPAN&gt;AddiPart&lt;/SPAN&gt;(&lt;SPAN&gt;xyz:1&lt;/SPAN&gt;, &lt;SPAN&gt;xyz.iam&lt;/SPAN&gt;, {&lt;SPAN&gt;"Member"&lt;/SPAN&gt;, &lt;SPAN&gt;"A"&lt;/SPAN&gt;})&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, on running the rule, it says :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;File "d:\foldername\xyz.iam"&amp;nbsp;does not exist or is not an iPart factory.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(The name of the actual file and path has been changed for this post)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I am 100% sure that this is an iAssembly.&lt;/P&gt;&lt;P&gt;Does iAssembly not work with "&lt;SPAN&gt;Components&lt;/SPAN&gt;.&lt;SPAN&gt;AddiPart" function?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Sep 2020 12:31:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-09-22T12:31:41Z</dc:date>
    <item>
      <title>Add iAssembly through iLogic Rule</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-iassembly-through-ilogic-rule/m-p/9761066#M116202</link>
      <description>&lt;P&gt;I am trying to add an iAssembly through an iLogic Rule.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This the code I am using.&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Components&lt;/SPAN&gt;.&lt;SPAN&gt;AddiPart&lt;/SPAN&gt;(&lt;SPAN&gt;xyz:1&lt;/SPAN&gt;, &lt;SPAN&gt;xyz.iam&lt;/SPAN&gt;, {&lt;SPAN&gt;"Member"&lt;/SPAN&gt;, &lt;SPAN&gt;"A"&lt;/SPAN&gt;})&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, on running the rule, it says :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;File "d:\foldername\xyz.iam"&amp;nbsp;does not exist or is not an iPart factory.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;(The name of the actual file and path has been changed for this post)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But I am 100% sure that this is an iAssembly.&lt;/P&gt;&lt;P&gt;Does iAssembly not work with "&lt;SPAN&gt;Components&lt;/SPAN&gt;.&lt;SPAN&gt;AddiPart" function?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 12:31:41 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-iassembly-through-ilogic-rule/m-p/9761066#M116202</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-22T12:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Add iAssembly through iLogic Rule</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-iassembly-through-ilogic-rule/m-p/9761121#M116205</link>
      <description>&lt;P&gt;The snippet is placed under the 'iLogic Assemblies/Components' tab, but i don't believe it is meant for adding a complete iAssembly into a document when i read the description.&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="Daan_M_0-1600778824422.png" style="width: 400px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/822216i135F11DF044454DF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daan_M_0-1600778824422.png" alt="Daan_M_0-1600778824422.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Maybe the code 'Component.Replace' helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 12:54:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-iassembly-through-ilogic-rule/m-p/9761121#M116205</guid>
      <dc:creator>Daan_M</dc:creator>
      <dc:date>2020-09-22T12:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Add iAssembly through iLogic Rule</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-iassembly-through-ilogic-rule/m-p/9761142#M116207</link>
      <description>&lt;P&gt;This is how it has worked for me in the past, where oPos is a Matrix and SelectRow is an Integer:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim NewoOcc As ComponentOccurrence = ThisDoc.Document.ComponentDefinition.Occurrences.AddiAssemblyMember(FilePath, oPos, SelectRow)&lt;/LI-CODE&gt;&lt;P&gt;I have had luck changing rows of an existing iAssembly with shorthand, where Row is an Integer:&lt;/P&gt;&lt;LI-CODE lang="general"&gt;iPart.ChangeRow(oOcc.Name, Row)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2020 12:54:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-iassembly-through-ilogic-rule/m-p/9761142#M116207</guid>
      <dc:creator>J-Camper</dc:creator>
      <dc:date>2020-09-22T12:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Add iAssembly through iLogic Rule</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-iassembly-through-ilogic-rule/m-p/9765394#M116276</link>
      <description>&lt;P&gt;@Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Component.AddiPart does not work for iAssemblies.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you can do is use these snippets instead&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Components.Add("xyz:1","xyz.iam")&lt;/STRONG&gt; - To add the iAssembly inside your assembly&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;iPart.FindRow("xyz:1","Member","=","A")&lt;/STRONG&gt; - To change the row that you want to in that iAssembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please accept this if this has answered your question.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Dutt Thakar&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 09:23:12 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-iassembly-through-ilogic-rule/m-p/9765394#M116276</guid>
      <dc:creator>dutt.thakar</dc:creator>
      <dc:date>2020-09-24T09:23:12Z</dc:date>
    </item>
    <item>
      <title>Re: Add iAssembly through iLogic Rule</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-iassembly-through-ilogic-rule/m-p/9765410#M116278</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/8021187"&gt;@Daan_M&lt;/a&gt;&amp;nbsp; and&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/4898893"&gt;@J-Camper&lt;/a&gt;&amp;nbsp;for your replies.&lt;/P&gt;&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/6518271"&gt;@dutt.thakar&lt;/a&gt;&amp;nbsp;your solution works.&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Thu, 24 Sep 2020 09:32:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/add-iassembly-through-ilogic-rule/m-p/9765410#M116278</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-24T09:32:57Z</dc:date>
    </item>
  </channel>
</rss>

