im looking for a way to suppress or delete a Component part feature from the assembly level by giving component name ("Part1") and component Feature name ("Hole6") thru the API
Thanks in advance......
Solved! Go to Solution.
Solved by montylowe. Go to Solution.
I figured it out.
My Code
if component is not suppressed then it goes out and suppresses or unsuppresses the feature based on a switch you send it.
Sub
oCompDef = oDoc.ComponentDefinition
oCompOcc = oCompDef.Occurrences.ItemByName(Comp)
ofeat = iFeature.InventorFeature(Comp, Feat)
Sub ACSFeat(ByVal Comp, ByVal Feat, ByVal SWT)
Dim oCompDef As Inventor.ComponentDefinition
Dim oCompOcc As Inventor.ComponentOccurrence
oCompDef = oDoc.ComponentDefinition
oCompOcc = oCompDef.Occurrences.ItemByName(Comp)
Dim ofeat As PartFeature
ofeat = iFeature.InventorFeature(Comp, Feat)
If oCompOcc.Suppressed = False Then
If SWT = False Then
If ofeat.Suppressed = False Then
Else
ofeat.Suppressed = False
End If
Else
If ofeat.Suppressed = True Then
Else
ofeat.Suppressed = True
End If
End If
Else
End If
End Sub