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: 

Get the current state of a feature

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
gert-leonvanlier
405 Views, 3 Replies

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

Get the current state of a feature

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.

Labels (2)
3 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)

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

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.

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:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
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: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 !

 

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:

Autodesk Software:Inventor Professional 2024 | Vault Professional 2022 | Autocad Mechanical 2022
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: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 !

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

Post to forums  

Autodesk Design & Make Report