Anonymous
407 Views, 2 Replies
02-10-2017
02:14 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
02-10-2017
02:14 PM
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 SubI 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?