<?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 iLogic add Mate Offset in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-add-mate-offset/m-p/9685658#M114444</link>
    <description>&lt;P&gt;i have an iLogic rule that Adds a part and creates constraints. The part changes depending on user selections. I need to take one occurrence, located at center, and make a pattern. I plan to offset the part then create a pattern. I went to where iLogic adds the Mate, and tried to include the optional Offset parameter. Every way I've tried to do this, I get an "offset not set to instance of object" error. It is just an equation to determine the offset, Height/number of parts + spacing between.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;Note: MediaHeight is found useing ilogic measure between named faces, and manipulated if a pattern is needed. It is returning a number in the logger, currently 7.961&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;MediaOffset&lt;/SPAN&gt; = (&lt;SPAN&gt;MediaHeight&lt;/SPAN&gt; + (&lt;SPAN&gt;MediaHeight&lt;/SPAN&gt;/2) + 1)&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;Constraints&lt;/SPAN&gt;.&lt;SPAN&gt;AddMate&lt;/SPAN&gt;(&lt;SPAN&gt;"MediaMate2"&lt;/SPAN&gt;, &lt;SPAN&gt;"Media"&lt;/SPAN&gt;, &lt;SPAN&gt;center&lt;/SPAN&gt;, &lt;SPAN&gt;""&lt;/SPAN&gt;, &lt;SPAN&gt;"YZ Plane"&lt;/SPAN&gt;,&lt;SPAN&gt;offset&lt;/SPAN&gt; := &lt;SPAN&gt;MediaOffset&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Aug 2020 18:51:37 GMT</pubDate>
    <dc:creator>jholland3XDLM</dc:creator>
    <dc:date>2020-08-11T18:51:37Z</dc:date>
    <item>
      <title>iLogic add Mate Offset</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-add-mate-offset/m-p/9685658#M114444</link>
      <description>&lt;P&gt;i have an iLogic rule that Adds a part and creates constraints. The part changes depending on user selections. I need to take one occurrence, located at center, and make a pattern. I plan to offset the part then create a pattern. I went to where iLogic adds the Mate, and tried to include the optional Offset parameter. Every way I've tried to do this, I get an "offset not set to instance of object" error. It is just an equation to determine the offset, Height/number of parts + spacing between.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Code:&lt;/P&gt;&lt;P&gt;Note: MediaHeight is found useing ilogic measure between named faces, and manipulated if a pattern is needed. It is returning a number in the logger, currently 7.961&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;MediaOffset&lt;/SPAN&gt; = (&lt;SPAN&gt;MediaHeight&lt;/SPAN&gt; + (&lt;SPAN&gt;MediaHeight&lt;/SPAN&gt;/2) + 1)&lt;/PRE&gt;&lt;PRE&gt;&lt;SPAN&gt;Constraints&lt;/SPAN&gt;.&lt;SPAN&gt;AddMate&lt;/SPAN&gt;(&lt;SPAN&gt;"MediaMate2"&lt;/SPAN&gt;, &lt;SPAN&gt;"Media"&lt;/SPAN&gt;, &lt;SPAN&gt;center&lt;/SPAN&gt;, &lt;SPAN&gt;""&lt;/SPAN&gt;, &lt;SPAN&gt;"YZ Plane"&lt;/SPAN&gt;,&lt;SPAN&gt;offset&lt;/SPAN&gt; := &lt;SPAN&gt;MediaOffset&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 18:51:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-add-mate-offset/m-p/9685658#M114444</guid>
      <dc:creator>jholland3XDLM</dc:creator>
      <dc:date>2020-08-11T18:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic add Mate Offset</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-add-mate-offset/m-p/9685705#M114445</link>
      <description>&lt;P&gt;You should be able to drop&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;offset&lt;/SPAN&gt; :=&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;and just use the variable&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;Constraints&lt;/SPAN&gt;.&lt;SPAN&gt;AddMate&lt;/SPAN&gt;(&lt;SPAN&gt;"MediaMate2"&lt;/SPAN&gt;, &lt;SPAN&gt;"Media"&lt;/SPAN&gt;, &lt;SPAN&gt;center&lt;/SPAN&gt;, &lt;SPAN&gt;""&lt;/SPAN&gt;, &lt;SPAN&gt;"YZ Plane"&lt;/SPAN&gt;, &lt;SPAN&gt;MediaOffset&lt;/SPAN&gt;)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 19:14:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-add-mate-offset/m-p/9685705#M114445</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-08-11T19:14:47Z</dc:date>
    </item>
    <item>
      <title>Re: iLogic add Mate Offset</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-add-mate-offset/m-p/9685744#M114446</link>
      <description>&lt;P&gt;When I went back to the rule. I realized the issues were with a sub-routine . There were a couple of different scenarios in which I needed to change how the constraints were, so I made a sub and called it when I needed. I got rid of that and just put it in an if statement,&amp;nbsp; everything worked fine.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Aug 2020 19:38:03 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/ilogic-add-mate-offset/m-p/9685744#M114446</guid>
      <dc:creator>jholland3XDLM</dc:creator>
      <dc:date>2020-08-11T19:38:03Z</dc:date>
    </item>
  </channel>
</rss>

