<?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: understanding the API and implement it in ilogic in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/understanding-the-api-and-implement-it-in-ilogic/m-p/11433741#M32682</link>
    <description>&lt;P&gt;The best way I have found to learn the inventor API is to try out a sample of code I know someone had functioning and work backwards, learn what your objects and methods do what and when and adjust to my custom needs. The samples in the help file work great for this. It is a shame they are in VBA and not also in VB.NET. The difference are slight but are enough to stop a new user progressing. The main thing to know is remove the word “Set” and ensure you start any sub routine with sub main as the driving sub routine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=AssemblyConstraints_AddMateConstraint2_Sample" target="_blank" rel="noopener"&gt;Here&lt;/A&gt; is a sample to constrain two parts together in an assembly. The other way to learn is to try and find the main method of an object you would like to use and work backwards to fill in what the and methods are required to have it function.&lt;/P&gt;&lt;P&gt;Here is the method for &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=AssemblyConstraints_AddFlushConstraint" target="_blank" rel="noopener"&gt;assemblyconstraints&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=CommandManager_Pick_Sample" target="_blank" rel="noopener"&gt;Here&lt;/A&gt; is the method for making a user selection of an object. The object filter will need to be changed to the object type . &amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Sep 2022 14:49:39 GMT</pubDate>
    <dc:creator>A.Acheson</dc:creator>
    <dc:date>2022-09-20T14:49:39Z</dc:date>
    <item>
      <title>understanding the API and implement it in ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/understanding-the-api-and-implement-it-in-ilogic/m-p/11432984#M32681</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the past years i have become very familiar with the ilogic method of coding.&amp;nbsp;&lt;/P&gt;&lt;P&gt;now i want to try a few new things in my code that i have never done before.&amp;nbsp;&lt;/P&gt;&lt;P&gt;for example. to make a constraint a want to click 2 parts of an assembly. these parts have predefined objects i use for constraining (origin plane and a workplane)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now for the constraint feature i need an ComponentArgument object. i have found some functions but they don't seem to be filling correctly.&amp;nbsp;&lt;/P&gt;&lt;P&gt;i think this is because my understanding of vb.net is far too limited.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in the help page i have found the ComponentArgument class and i can se there are : constructors, properties, methods and type converions.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this looks like a lot of information, but for now i can't do anything with this. i don't know what methods are and how to implement this in my ilogic code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there someone that has a guide/ tutorial or just an explanation how to navigate these different branches within the class i seem to be needing?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;kind regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Geert&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 09:54:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/understanding-the-api-and-implement-it-in-ilogic/m-p/11432984#M32681</guid>
      <dc:creator>GeertvanderHeide</dc:creator>
      <dc:date>2022-09-20T09:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: understanding the API and implement it in ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/understanding-the-api-and-implement-it-in-ilogic/m-p/11433741#M32682</link>
      <description>&lt;P&gt;The best way I have found to learn the inventor API is to try out a sample of code I know someone had functioning and work backwards, learn what your objects and methods do what and when and adjust to my custom needs. The samples in the help file work great for this. It is a shame they are in VBA and not also in VB.NET. The difference are slight but are enough to stop a new user progressing. The main thing to know is remove the word “Set” and ensure you start any sub routine with sub main as the driving sub routine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=AssemblyConstraints_AddMateConstraint2_Sample" target="_blank" rel="noopener"&gt;Here&lt;/A&gt; is a sample to constrain two parts together in an assembly. The other way to learn is to try and find the main method of an object you would like to use and work backwards to fill in what the and methods are required to have it function.&lt;/P&gt;&lt;P&gt;Here is the method for &lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=AssemblyConstraints_AddFlushConstraint" target="_blank" rel="noopener"&gt;assemblyconstraints&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://help.autodesk.com/view/INVNTOR/2022/ENU/?guid=CommandManager_Pick_Sample" target="_blank" rel="noopener"&gt;Here&lt;/A&gt; is the method for making a user selection of an object. The object filter will need to be changed to the object type . &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Sep 2022 14:49:39 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/understanding-the-api-and-implement-it-in-ilogic/m-p/11433741#M32682</guid>
      <dc:creator>A.Acheson</dc:creator>
      <dc:date>2022-09-20T14:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: understanding the API and implement it in ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/understanding-the-api-and-implement-it-in-ilogic/m-p/11437929#M32683</link>
      <description>&lt;P&gt;i think i understand why i am so confused.&amp;nbsp;&lt;/P&gt;&lt;P&gt;when adding a constraint inside ilogic it shows a lot more inputs:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GeertvanderHeide_0-1663826263906.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1119128i006107235F04432B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GeertvanderHeide_0-1663826263906.png" alt="GeertvanderHeide_0-1663826263906.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;so here it shows the code needs a componentargument and an entityname as string.&amp;nbsp;&lt;/P&gt;&lt;P&gt;That looks to me like something completely different then 2 input planes and an offset.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i did got it to work with the following paramters:&lt;/P&gt;&lt;P&gt;componentargument = occurence.name as string&lt;/P&gt;&lt;P&gt;when component argument is current assembly fill in an empty string --&amp;gt; ""&lt;/P&gt;&lt;P&gt;then entity name is just the name of the plane in my case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but the constraining between a plane in a subassembly and a plane in the current assembly is not something i could find anywhere..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 06:10:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/understanding-the-api-and-implement-it-in-ilogic/m-p/11437929#M32683</guid>
      <dc:creator>GeertvanderHeide</dc:creator>
      <dc:date>2022-09-22T06:10:19Z</dc:date>
    </item>
    <item>
      <title>Re: understanding the API and implement it in ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/understanding-the-api-and-implement-it-in-ilogic/m-p/11439012#M32684</link>
      <description>&lt;P&gt;Hallo&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/11602102"&gt;@GeertvanderHeide&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;to constrain a subcomponent you have to use an array of strings for the ComponentArgument.&lt;/P&gt;&lt;P&gt;I have created a top level assembly &lt;EM&gt;&lt;STRONG&gt;Sub_00.iam&lt;/STRONG&gt;&lt;/EM&gt; including a first level subassembly component &lt;EM&gt;&lt;STRONG&gt;Sub_01:1&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cidhelp_0-1663856226077.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1119354i242C404CE8164831/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cidhelp_0-1663856226077.png" alt="cidhelp_0-1663856226077.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;The subassembly includes a part component Part_01:1 with an assigned entity name &lt;EM&gt;&lt;STRONG&gt;FrontFace&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cidhelp_1-1663856386774.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1119356i095C835D28F50C87/image-size/medium?v=v2&amp;amp;px=400" role="button" title="cidhelp_1-1663856386774.png" alt="cidhelp_1-1663856386774.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now I can add a constraint in the top level assembly using iLogic:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Dim oComp1 As ComponentArgument = "" 'empty string for root component&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Dim oComp2 As ComponentArgument = "Sub_01:1" 'string for first level component&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Dim oComp3 As ComponentArgument = {"Sub_01:1" , "Part_01:1"} 'array of strings for subcomponent&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="terminal,monaco"&gt;Constraints.AddFlush("Flush1", oComp1, "XY Plane", oComp3, "FrontFace")&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case the &lt;EM&gt;&lt;STRONG&gt;XY Plane&lt;/STRONG&gt;&lt;/EM&gt; of the top level assembly will be constraint to the face named &lt;EM&gt;&lt;STRONG&gt;FrontFace&lt;/STRONG&gt;&lt;/EM&gt; of the Part in the subassembly. See the comments how to create a ComponentArgument-Object using an empty string, a string or an array of strings.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 14:33:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/understanding-the-api-and-implement-it-in-ilogic/m-p/11439012#M32684</guid>
      <dc:creator>cidhelp</dc:creator>
      <dc:date>2022-09-22T14:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: understanding the API and implement it in ilogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/understanding-the-api-and-implement-it-in-ilogic/m-p/11440538#M32685</link>
      <description>&lt;P&gt;Thanks for the explanation!&lt;/P&gt;&lt;P&gt;I don't think there is a way i would have figured that out myself.&amp;nbsp;&lt;/P&gt;&lt;P&gt;this also helps a bit in understanding how to fill in objects like this &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="GeertvanderHeide_0-1663913258985.png" style="width: 600px;"&gt;&lt;img src="https://forums.autodesk.com/t5/image/serverpage/image-id/1119663i30618354E67EFBDE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="GeertvanderHeide_0-1663913258985.png" alt="GeertvanderHeide_0-1663913258985.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 06:09:21 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/understanding-the-api-and-implement-it-in-ilogic/m-p/11440538#M32685</guid>
      <dc:creator>GeertvanderHeide</dc:creator>
      <dc:date>2022-09-23T06:09:21Z</dc:date>
    </item>
  </channel>
</rss>

