<?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: Activate a flat pattern Orientation through iLogic in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/activate-a-flat-pattern-orientation-through-ilogic/m-p/10742948#M131028</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;you have to pick your created orientations from collection. Only then you can activate them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;SPLIT_AMOUNT&lt;/SPAN&gt; = 1 &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;smDef&lt;/SPAN&gt;.&lt;SPAN&gt;FlatPattern&lt;/SPAN&gt;.&lt;SPAN&gt;FlatPatternOrientations&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Left"&lt;/SPAN&gt;).&lt;SPAN&gt;Activate&lt;/SPAN&gt;
&lt;SPAN&gt;ElseIf&lt;/SPAN&gt; &lt;SPAN&gt;SPLIT_AMOUNT&lt;/SPAN&gt; = 2 &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;smDef&lt;/SPAN&gt;.&lt;SPAN&gt;FlatPattern&lt;/SPAN&gt;.&lt;SPAN&gt;FlatPatternOrientations&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Right"&lt;/SPAN&gt;).&lt;SPAN&gt;Activate&lt;/SPAN&gt;
&lt;SPAN&gt;ElseIf&lt;/SPAN&gt; &lt;SPAN&gt;SPLIT_AMOUNT&lt;/SPAN&gt; = 3 &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;smDef&lt;/SPAN&gt;.&lt;SPAN&gt;FlatPattern&lt;/SPAN&gt;.&lt;SPAN&gt;FlatPatternOrientations&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Middle"&lt;/SPAN&gt;).&lt;SPAN&gt;Activate&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 08 Nov 2021 15:41:17 GMT</pubDate>
    <dc:creator>petr.meduna</dc:creator>
    <dc:date>2021-11-08T15:41:17Z</dc:date>
    <item>
      <title>Activate a flat pattern Orientation through iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/activate-a-flat-pattern-orientation-through-ilogic/m-p/10742857#M131025</link>
      <description>&lt;P&gt;I've made three orientations within the "Edit Flat Patter Definition" and I want to use iLogic to activate the correct orientation in a specific situation. I've found some code within the API help and tried to use that in different ways, but everytime I get a different error. I don't have (a lot of) experience with API, so I hope someone can help me with this and explain to me what I'm doing wrong.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 3 orientations named "Left", "Right" and "Middle" and I use the code below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;Dim partDoc As PartDocument = ThisApplication.ActiveDocument
Dim smDef As SheetMetalComponentDefinition = partDoc.ComponentDefinition

If SPLIT_AMOUNT = 1 Then
	smDef.FlatPattern.FlatPatternOrientations.ActiveFlatPatternOrientation.Activate("Left")
ElseIf SPLIT_AMOUNT = 2 Then
	smDef.FlatPattern.FlatPatternOrientations.ActiveFlatPatternOrientation.Activate("Right")
ElseIf SPLIT_AMOUNT = 3 Then
	smDef.FlatPattern.FlatPatternOrientations.ActiveFlatPatternOrientation.Activate("Middle")
End If&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Inventor 2021.3.1&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 15:05:27 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/activate-a-flat-pattern-orientation-through-ilogic/m-p/10742857#M131025</guid>
      <dc:creator>L.Greft</dc:creator>
      <dc:date>2021-11-08T15:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Activate a flat pattern Orientation through iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/activate-a-flat-pattern-orientation-through-ilogic/m-p/10742948#M131028</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;you have to pick your created orientations from collection. Only then you can activate them.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;If&lt;/SPAN&gt; &lt;SPAN&gt;SPLIT_AMOUNT&lt;/SPAN&gt; = 1 &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;smDef&lt;/SPAN&gt;.&lt;SPAN&gt;FlatPattern&lt;/SPAN&gt;.&lt;SPAN&gt;FlatPatternOrientations&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Left"&lt;/SPAN&gt;).&lt;SPAN&gt;Activate&lt;/SPAN&gt;
&lt;SPAN&gt;ElseIf&lt;/SPAN&gt; &lt;SPAN&gt;SPLIT_AMOUNT&lt;/SPAN&gt; = 2 &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;smDef&lt;/SPAN&gt;.&lt;SPAN&gt;FlatPattern&lt;/SPAN&gt;.&lt;SPAN&gt;FlatPatternOrientations&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Right"&lt;/SPAN&gt;).&lt;SPAN&gt;Activate&lt;/SPAN&gt;
&lt;SPAN&gt;ElseIf&lt;/SPAN&gt; &lt;SPAN&gt;SPLIT_AMOUNT&lt;/SPAN&gt; = 3 &lt;SPAN&gt;Then&lt;/SPAN&gt;
	&lt;SPAN&gt;smDef&lt;/SPAN&gt;.&lt;SPAN&gt;FlatPattern&lt;/SPAN&gt;.&lt;SPAN&gt;FlatPatternOrientations&lt;/SPAN&gt;.&lt;SPAN&gt;Item&lt;/SPAN&gt;(&lt;SPAN&gt;"Middle"&lt;/SPAN&gt;).&lt;SPAN&gt;Activate&lt;/SPAN&gt;
&lt;SPAN&gt;End&lt;/SPAN&gt; &lt;SPAN&gt;If&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 15:41:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/activate-a-flat-pattern-orientation-through-ilogic/m-p/10742948#M131028</guid>
      <dc:creator>petr.meduna</dc:creator>
      <dc:date>2021-11-08T15:41:17Z</dc:date>
    </item>
    <item>
      <title>Re: Activate a flat pattern Orientation through iLogic</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/activate-a-flat-pattern-orientation-through-ilogic/m-p/10742980#M131029</link>
      <description>&lt;P&gt;Thank you &lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/5516245"&gt;@petr.meduna&lt;/a&gt;,&amp;nbsp;I'm not at work anymore so I will try this tomorrow.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Nov 2021 15:59:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/activate-a-flat-pattern-orientation-through-ilogic/m-p/10742980#M131029</guid>
      <dc:creator>L.Greft</dc:creator>
      <dc:date>2021-11-08T15:59:48Z</dc:date>
    </item>
  </channel>
</rss>

