How to suppress feature in subcomponent

How to suppress feature in subcomponent

SECOJOSE
Contributor Contributor
182 Views
3 Replies
Message 1 of 4

How to suppress feature in subcomponent

SECOJOSE
Contributor
Contributor

The goal is to have features in a subcomponent match the state of the mating part in the assembly. For example, if you have an assembly that has a block with a hole that holds a rod, if you suppress the rod in the assembly, the hole will be suppressed in the block. I want to know if this can be accomplished by setting the "IsActive" state of the rod with the active state of the hole feature in the subcomponent. Specifically, I'm asking for the ilogic code that can reference subcomponent features in the assembly's ilogic. I currently have a Boolean parameter in the assembly that passes to the subcomponent but want to get away from that method.

0 Likes
183 Views
3 Replies
Replies (3)
Message 2 of 4

bradeneuropeArthur
Mentor
Mentor

You can try to use Model States, than no programming is needed!

 

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

0 Likes
Message 3 of 4

SECOJOSE
Contributor
Contributor

The objective is to work automation into the assembly. I just need to know if ilogic code exists to reference features in another part.

0 Likes
Message 4 of 4

JelteDeJong
Mentor
Mentor

you could try something like this:

Dim occ As ComponentOccurrence = ThisApplication.CommandManager.Pick(SelectionFilterEnum.kAssemblyLeafOccurrenceFilter, "Select a smeetmetal part")

Dim def As PartComponentDefinition = occ.Definition

Dim features = def.Features
Dim lastFeatures = features.Item(features.Count)

lastFeatures.Suppressed = True

Jelte de Jong
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


Blog: hjalte.nl - github.com

0 Likes