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.
Solved! Go to Solution.
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.
Solved! Go to Solution.
Solved by bradeneuropeArthur. Go to Solution.
Solved by WCrihfield. Go to 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
(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
(Not an Autodesk Employee)
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.
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.
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.