Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Component part feature suppression

1 REPLY 1
SOLVED
Reply
Message 1 of 2
montylowe
420 Views, 1 Reply

Component part feature suppression

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

1 REPLY 1
Message 2 of 2
montylowe
in reply to: montylowe

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

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report