- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
So this should be very simple but I cannot get this to work as intended.
I have a very simple code that measures the dimensions of a part when you run it.
G_L = MaxOfMany(Measure.ExtentsLength,Measure.ExtentsWidth,Measure.ExtentsHeight) G_T = MinOfMany(Measure.ExtentsLength,Measure.ExtentsWidth,Measure.ExtentsHeight) G_W = Measure.ExtentsLength + Measure.ExtentsWidth + Measure.ExtentsHeight - G_L - G_T iLogicVb.UpdateWhenDone = True
I'm using the Event Trigger to run the rule on "Part Geometry Change".
You would expect that if you modify the part via extrude/cut/whatever. Inventor would see the part geometry has changed, it would run the rule, and I would have the new dimensions of the part in my parameters. However, that's not quite what happens. My rule is always 1 step behind my latest operation. I think Inventor is registering that a part geometry change is about to happen, and before it does, it runs my rule to measure the part. Then after it has finished measuring it, the part geometry changes.
Below is my order of operations and what I'm observing:
- I start with a cube 1x1x1 and my rule has not run yet (my G_T, G_W, G_L are all zero).
- I change my extrude length to 10 so that my part is 1x1x10.
- My parameters update to G_T=1, G_W=1, G_L=1.
- I change my extrude length back to 1 (part dimensions 1x1x1).
- My parameters update again to G_T=1, G_W=1, G_L=10.
It seems like the Event Trigger should be worded "Before Part Geometry Change" and I would really like an event trigger that is "After Part Geometry Change". This has been very frustrating and I haven't been able to find anyone with a similar problem. Any help would be very appreciated.
Thanks!
Solved! Go to Solution.