<?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 Check to see if an iPart feature is suppressed using Inventor API in Inventor Programming - iLogic, Macros, AddIns &amp; Apprentice</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/check-to-see-if-an-ipart-feature-is-suppressed-using-inventor/m-p/6870381#M70136</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I currently have VBA code that I am using to rotate an iPart in an assembly 180 degrees:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub RotateAroundAxis()
  Const PI = 3.14159265358979
  
  Dim d As AssemblyDocument
  Set d = ThisApplication.ActiveDocument
  
  Dim a As WorkAxis
  Set a = d.ComponentDefinition.WorkAxes(3)
  
  Dim o As ComponentOccurrence
  Set o = d.ComponentDefinition.Occurrences(1)
  
  Dim t As TransientGeometry
  Set t = ThisApplication.TransientGeometry
    
  Dim l As Line
  Set l = a.Line
  
  Dim mRot As Matrix
  Set mRot = t.CreateMatrix()
  ' PI / 2 =&amp;gt; 90 deg
  Call mRot.SetToRotation(PI, l.Direction.AsVector(), l.RootPoint)
  
  Dim m As Matrix
  Set m = o.Transformation
  Call m.PreMultiplyBy(mRot)
  
  o.Transformation = m
 
End Sub&lt;/PRE&gt;&lt;P&gt;I want to add a conditional statement that only rotates the iPart if a specific emboss feature ("Drain Port E2") is suppressed. How do I call out the emboss feature to see if the suppression is true or false?&lt;/P&gt;</description>
    <pubDate>Fri, 10 Feb 2017 22:14:40 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-02-10T22:14:40Z</dc:date>
    <item>
      <title>Check to see if an iPart feature is suppressed using Inventor API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/check-to-see-if-an-ipart-feature-is-suppressed-using-inventor/m-p/6870381#M70136</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I currently have VBA code that I am using to rotate an iPart in an assembly 180 degrees:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Sub RotateAroundAxis()
  Const PI = 3.14159265358979
  
  Dim d As AssemblyDocument
  Set d = ThisApplication.ActiveDocument
  
  Dim a As WorkAxis
  Set a = d.ComponentDefinition.WorkAxes(3)
  
  Dim o As ComponentOccurrence
  Set o = d.ComponentDefinition.Occurrences(1)
  
  Dim t As TransientGeometry
  Set t = ThisApplication.TransientGeometry
    
  Dim l As Line
  Set l = a.Line
  
  Dim mRot As Matrix
  Set mRot = t.CreateMatrix()
  ' PI / 2 =&amp;gt; 90 deg
  Call mRot.SetToRotation(PI, l.Direction.AsVector(), l.RootPoint)
  
  Dim m As Matrix
  Set m = o.Transformation
  Call m.PreMultiplyBy(mRot)
  
  o.Transformation = m
 
End Sub&lt;/PRE&gt;&lt;P&gt;I want to add a conditional statement that only rotates the iPart if a specific emboss feature ("Drain Port E2") is suppressed. How do I call out the emboss feature to see if the suppression is true or false?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Feb 2017 22:14:40 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/check-to-see-if-an-ipart-feature-is-suppressed-using-inventor/m-p/6870381#M70136</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-10T22:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Check to see if an iPart feature is suppressed using Inventor API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/check-to-see-if-an-ipart-feature-is-suppressed-using-inventor/m-p/6878718#M70184</link>
      <description>&lt;P&gt;Hey, try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;'...&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;Dim o As ComponentOccurrence
Set o = d.ComponentDefinition.Occurrences(1)

Dim oDoc As Document
Set oDoc = o.Definition.Document

If oDoc.DocumentType &amp;lt;&amp;gt; DocumentTypeEnum.kPartDocumentObject Then
	Exit Sub
End If

Dim oFT As PartFeature
Set oFT = oDoc.ComponentDefinition.Features.Item("&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;Drain Port E2&lt;/STRONG&gt;&lt;/FONT&gt;")

If Not oFT.Suppressed Then
	Exit Sub
End If&lt;BR /&gt;&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;'...&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 15 Feb 2017 06:29:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/check-to-see-if-an-ipart-feature-is-suppressed-using-inventor/m-p/6878718#M70184</guid>
      <dc:creator>Owner2229</dc:creator>
      <dc:date>2017-02-15T06:29:35Z</dc:date>
    </item>
    <item>
      <title>Re: Check to see if an iPart feature is suppressed using Inventor API</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-ilogic/check-to-see-if-an-ipart-feature-is-suppressed-using-inventor/m-p/6880886#M70223</link>
      <description>&lt;P&gt;I tried that out, and it gave me an "invalid procedure call or argument." I think it has to do with the fact that it's an iPart.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;created a function to call in my main sub&amp;nbsp;that ended up working:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Function FindDrain(o As ComponentOccurrence)

FindDrain = False

Dim iPartRow As iPartTableRow
Set iPartRow = o.Definition.iPartMember.Row

If iPartRow.Item(17).Value = "Compute" Then

FindDrain = True

End If

End Function&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;By going into Definition.iPartMember.Row, I gain access to the current occurrence's row in the iPart table. Item(17) is the column associated with Drain Port E2. In the iPart table, the feature is either set to "Compute" or "Suppress."&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 21:26:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-ilogic/check-to-see-if-an-ipart-feature-is-suppressed-using-inventor/m-p/6880886#M70223</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-02-15T21:26:50Z</dc:date>
    </item>
  </channel>
</rss>

