- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Propagation and parametrism
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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.