02-23-2021
02:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
02-23-2021
02:11 PM
Supress part feature while edit in place
I'm trying to toggle suppression states of a user selected feature (extrusion) while double clicked into a part (edit in place) from an upper level assembly.
This works if the part is open explicitly but not while editing in place. What am I missing?
Dim oDoc As PartDocument
oDoc = ThisApplication.ActiveEditDocument
Dim oParams As Parameters
oParams = oDoc.ComponentDefinition.Parameters
Dim oFeatures As PartFeatures
oFeatures = oDoc.ComponentDefinition.Features
Dim oSelectSet As SelectSet
oSelectSet = oDoc.SelectSet
For Each Feature_Name In oSelectSet
oName = Feature_Name.name
If Feature.IsActive(oName) = False Then
Feature.IsActive(oName) = True
MsgBox("part is off - unsuppress it")
ElseIf Feature.IsActive(oName) = True Then
Feature.IsActive(oName) = False
MsgBox("part is on - suppress it")
Else
End If
Next
InventorVb.DocumentUpdate()