<?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 Sheet Metal aktiv unfold rule in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/sheet-metal-aktiv-unfold-rule/m-p/5533984#M54542</link>
    <description>&lt;P&gt;How can I find the aktiv unfold rule.&lt;/P&gt;&lt;P&gt;Now I use the 'InUse' code, but then I get 2 rules. 1 is the rule of the shet metal rule and 1 is the aktiv unfold rule.&lt;/P&gt;&lt;P&gt;I hope someone knows how to do this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wim&lt;/P&gt;</description>
    <pubDate>Mon, 09 Mar 2015 21:36:47 GMT</pubDate>
    <dc:creator>w.pepping</dc:creator>
    <dc:date>2015-03-09T21:36:47Z</dc:date>
    <item>
      <title>Sheet Metal aktiv unfold rule</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/sheet-metal-aktiv-unfold-rule/m-p/5533984#M54542</link>
      <description>&lt;P&gt;How can I find the aktiv unfold rule.&lt;/P&gt;&lt;P&gt;Now I use the 'InUse' code, but then I get 2 rules. 1 is the rule of the shet metal rule and 1 is the aktiv unfold rule.&lt;/P&gt;&lt;P&gt;I hope someone knows how to do this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wim&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2015 21:36:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/sheet-metal-aktiv-unfold-rule/m-p/5533984#M54542</guid>
      <dc:creator>w.pepping</dc:creator>
      <dc:date>2015-03-09T21:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal aktiv unfold rule</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/sheet-metal-aktiv-unfold-rule/m-p/5534346#M54547</link>
      <description>&lt;P&gt;I think this is what you might be looking for.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Private Sub FlatStyle()

    Dim oDoc As Inventor.PartDocument
    Set oDoc = ThisApplication.ActiveDocument
    
    Dim oCompDef As SheetMetalComponentDefinition
    Set oCompDef = oDoc.ComponentDefinition
    
    Dim oName As String
    oName = oCompDef.ActiveSheetMetalStyle.Name
    
End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Mar 2015 08:41:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/sheet-metal-aktiv-unfold-rule/m-p/5534346#M54547</guid>
      <dc:creator>CadUser46</dc:creator>
      <dc:date>2015-03-10T08:41:47Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal aktiv unfold rule</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/sheet-metal-aktiv-unfold-rule/m-p/5537622#M54596</link>
      <description>&lt;PRE&gt;That is not what I am looking for. If there are 2 or more rules then I can't find a way to find thar rule with a straight code. If the aktive rule is different from the selected unfold rule in the aktiv sheet metal style then it is not sure wich one you get.&lt;BR /&gt;&lt;BR /&gt;With this code I get the aktiv unfold rule but I hope there is a better way.   &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Function kFactor(ByVal oSheetMetalCompDef As SheetMetalComponentDefinition)
        Dim strFindK As String = String.Empty
        Dim oUnfoldMethod As UnfoldMethod = Nothing
        Dim countUnfolds As Integer = 0
        For Each oUnfoldMethod In oSheetMetalCompDef.UnfoldMethods
            If oUnfoldMethod.InUse Then countUnfolds = countUnfolds + 1
        Next
          For Each oUnfoldMethod In oSheetMetalCompDef.UnfoldMethods
            If oUnfoldMethod.InUse Then
                If countUnfolds &amp;gt; 1 Then
                                    If Not oUnfoldMethod.Name.ToString = oSheetMetalCompDef.ActiveSheetMetalStyle.UnfoldMethod.Name.ToString Then
                                           Select Case oUnfoldMethod.UnfoldMethodType
                            Case UnfoldMethodTypeEnum.kBendTableUnfoldMethod
                                strFindK = oUnfoldMethod.Name.ToString
                            Case UnfoldMethodTypeEnum.kLinearUnfoldMethod
                                If oUnfoldMethod.kFactor.ToString.EndsWith("ul") Then
                                    strFindK = oUnfoldMethod.kFactor.Remove(oUnfoldMethod.kFactor.Length - 3, 3)
                                Else
                                    strFindK = oUnfoldMethod.kFactor.ToString
                                End If
                            Case UnfoldMethodTypeEnum.kCustomEquationUnfoldMethod
                                strFindK = "Equation"
                        End Select
                    End If
                Else
                    Select Case oUnfoldMethod.UnfoldMethodType
                        Case UnfoldMethodTypeEnum.kBendTableUnfoldMethod
                            strFindK = oUnfoldMethod.Name.ToString
                        Case UnfoldMethodTypeEnum.kLinearUnfoldMethod
                            If oUnfoldMethod.kFactor.ToString.EndsWith("ul") Then
                                strFindK = oUnfoldMethod.kFactor.Remove(oUnfoldMethod.kFactor.Length - 3, 3)
                            Else
                                strFindK = oUnfoldMethod.kFactor.ToString
                            End If
                        Case UnfoldMethodTypeEnum.kCustomEquationUnfoldMethod
                            strFindK = "Equation"
                    End Select
                End If
            End If
        Next

        Return strFindK
    End Function&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2015 06:15:18 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/sheet-metal-aktiv-unfold-rule/m-p/5537622#M54596</guid>
      <dc:creator>w.pepping</dc:creator>
      <dc:date>2015-03-12T06:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sheet Metal aktiv unfold rule</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/sheet-metal-aktiv-unfold-rule/m-p/5537702#M54599</link>
      <description>&lt;P&gt;Im really not sure what you are trying to achieve.&amp;nbsp; Are you trying to see if the user has locally edited the sheet metal style so its now different from the library?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Mar 2015 08:03:52 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/sheet-metal-aktiv-unfold-rule/m-p/5537702#M54599</guid>
      <dc:creator>CadUser46</dc:creator>
      <dc:date>2015-03-12T08:03:52Z</dc:date>
    </item>
  </channel>
</rss>

