[Add-In] user-parameter driven results - is this possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Pardon my newbie question:
My add-in creates a sketch, based on inputs from my user. Does Fusion360 have a way to tell me *later* if any of those parameters have changed, so my Add-in can update what it did?
My *guess* (I'm a programmer) is that fusion 360 should be "remembering" everything it fed in to my command, along with the output of my command - and later if anything changes, it should auto-magically "erase" what my command originally outputted, re-run my command with the (now updated) input that it "remembered", so my add-in can re-output the updated solution. Or, more usefully, instead of "erase", allow me some mechanism to instruct it how the new output differs from the original output (e.g. in my case - give updated locations for a range of points along which a spline has been built) - which probably means giving me a copy of both the old and the new inputs, and allowing me some way to explain back to it which bits I originally provided (e.g. list of sketch points) and how they are now changed.
For example - I've got these 2 user parameters (chord_len and max_speed):
I created a sketch with a line that is chord_len long.
I run my addin and use it to select the two points at the start and end of that line, and enter max_speed into my addin command entry panel like so:
Which inserts my result:
Right now, if I move any of the points, or change any of the user parameters (chord_len or max_speed), my add-in is not being consulted, so the previously-inserted shape which is still showing, is now really wrong (wrong size, and wrong geometry for the new flow regime).
I am "hooked in" to ValidateInputsEventHandler, InputChangedEventHandler, and CommandEventHandler - I was expecting that last one to get called again when I changed stuff.
a) Is this possible, and
b) if yes, what's the high-level answer for how this works and what I need to do/use ?
Chris.