Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
Anonymous
407 Views, 2 Replies

Check to see if an iPart feature is suppressed using Inventor API

Hi,

 

I currently have VBA code that I am using to rotate an iPart in an assembly 180 degrees:

 

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 => 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

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?