Propagation and parametrism

Propagation and parametrism

Anonymous
Not applicable
350 Views
3 Replies
Message 1 of 4

Propagation and parametrism

Anonymous
Not applicable

Hello,

I'd like to know if this scenario is possible with Inventor API :

 

1) We modify an attribute on a Inventor feature (color for exemple)
2) We call a custom command with this feature as an argument (with our own code)
During this custom command we propagate the attribute to the children (results)
3) Then we modify the attribut on the parent


=> We would like to see the children attributes be updated as well.

 

Any help is greatly appreciated !

Thanks,

Thomas

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

JamieVJohnson2
Collaborator
Collaborator

You can get at all the parts of an assembly like this:

 

AssemblyDocument.ComponentDefinition.Occurrences(index).Definition

 

So with the right structure, I can see it is very possible.

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
0 Likes
Message 3 of 4

Anonymous
Not applicable

Hi Jamie and thank you for your response !

 

Currently we are in a part environment.

 

Also I don't understand how your code sample could help me ? What I would like to know is if Inventor can create this parametrism automatically, without needing the user to call a custom command to propagate the attribute he has set on the parent feature.

0 Likes
Message 4 of 4

JamieVJohnson2
Collaborator
Collaborator

Features...  ok then (remember this is pseudo code)

dim feat as PartFeature = PartDocument.ComponentDefinition.Features

 

For the latter part of your question.  Inventor has Events for many things (look at Manage\iLogic\EventTriggers in the ribbon), your trick is to hook into the most appropriate event (and least intrusive) then perform your task at that time.  I find Before Save document to be my best event, because the user has to save sometime.

Jamie Johnson : Owner / Sisu Lissom, LLC https://sisulissom.com/
0 Likes