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

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()

 

Labels (3)