Get the current state of a feature

Get the current state of a feature

gert-leonvanlier
Collaborator Collaborator
502 Views
3 Replies
Message 1 of 4

Get the current state of a feature

gert-leonvanlier
Collaborator
Collaborator

Is there  a way in the API of Inventor to determine if a feature is suppressed or not? So not just setting the value, but "reading" the current state. This may be a solution for my models to speed up suppressing multiple features at once.

0 Likes
Accepted solutions (2)
503 Views
3 Replies
Replies (3)
Message 2 of 4

WCrihfield
Mentor
Mentor
Accepted solution

A PartFeature has two properties that can be checked.  The most obvious one is called "Suppressed", and is a Get/Set type of property who's value is a Boolean.  The other property you can check is its "HealthStatus".  It is a 'read only' type of property, who's value is a "HealthStatusEnum".  And one of its variations is "kSuppressedHealth".

 

If this does not apply to your situation, then what type(s) of features are you referring to, and in what environment (part or assembly)?

 

If this solved your problem, or answered your question, please click ACCEPT SOLUTION.
Or, if this helped you, please click (LIKE or KUDOS) 👍.

Wesley Crihfield

EESignature

(Not an Autodesk Employee)

Message 3 of 4

gert-leonvanlier
Collaborator
Collaborator

These options could maybe solve my problem, but I have to test it.

 

I am working on parts where I need to suppress multiple features. Mostly extrudes, revolves, sweeps etc. At the moment my iLogic rules just sets the suppress state to true or false, no matter the current state. If I can check before the suppression takes place if the feature is suppressed or not I can skip setting the suppression state.

0 Likes
Message 4 of 4

bradeneuropeArthur
Mentor
Mentor
Accepted solution

 

Dim a As Inventor.PartDocument = ThisDoc.Document



For Each f As Inventor.PartFeature In a.ComponentDefinition.Features
	Msgbox (f.Suppressed)
	Next

May this help you?

 

Regards,

 

Regards,

Arthur Knoors

Autodesk Affiliations & Links:
blue LinkedIn LogoSquare Youtube Logo Isolated on White Background


Autodesk Software:Inventor Professional 2025 | Vault Professional 2024 | Autocad Mechanical 2024
Programming Skills:Vba | Vb.net (Add ins Vault / Inventor, Applications) | I-logic
Programming Examples:
Drawing List!|
Toggle Drawing Sheet!|
Workplane Resize!|
Drawing View Locker!|
Multi Sheet to Mono Sheet!|
Drawing Weld Symbols!|
Drawing View Label Align!|
Open From Balloon!|
Model State Lock!
Posts and Ideas:
My Ideas|
Dimension Component!|
Partlist Export!|
Derive I-properties!|
Vault Prompts Via API!|
Vault Handbook/Manual!|
Drawing Toggle Sheets!|
Vault Defer Update!

! For administrative reasons, please mark a "Solution as solved" when the issue is solved !


 


EESignature