Community
Fusion API and Scripts
Got a new add-in to share? Need something specialized to be scripted? Ask questions or share what you’ve discovered with the community.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Feature Request: Controlling which inputs trigger a preview

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
424 Views, 3 Replies

Feature Request: Controlling which inputs trigger a preview

I really need some level of control over which inputs trigger a preview. When any update to any input causes a preview it's near impossible to provide the user any textual feedback without firing at least 2 preview generations.

 

There was a recent change in the Fusion API (some time in May maybe?) which is now resulting in updates of READ ONLY fields causing a preview to be triggered. This "broke" my Helical Gear generator add-in by causing an infinite preview loop - a preview updates a textbox input to provide the user with detailed information about the generated gear, writing to this input was triggering another preview, and so on. I've put a band-aid on the problem in v1.0.2 which drops the preview looping down from infinite to probability 2 to 4 preview generations (I have no way to provide myself with feedback about how many previews happen because that would cause previews to triggered and message boxes are more than annoying for this) but it's not a solution.

 

For some reason the "Group" control has always triggered a preview when expanding or collapsing which is a bit crazy IMO.

 

I see three solutions off the top of my head which could all co-exist but I'd welcome any one of them

1) give each input a boolean property along the lines of "TriggersPreviewOnChange"

2) allow the onchanged handler the ability to prevent a preview

3) within the preview function give the ability to abort the generation of a new preview - aka use previous preview result

3 REPLIES 3
Message 2 of 4
ekinsb
in reply to: Anonymous

This is a good question.  Thanks for pointing it out and I want to let you know that we're investigating it.


Brian Ekins
Inventor and Fusion 360 API Expert
Mod the Machine blog
Message 3 of 4
Anonymous
in reply to: ekinsb

Thanks for looking into this.

 

One more suggestion on this topic: It would go a long way to bullet-proof against this issue if Fusion simply prevented a preview from being triggered while the preview callback is running 

Message 4 of 4
nraynaud
in reply to: Anonymous

any progress or workaround on the issue?

 

I am really struggling with the storm of useless preview events and the associated destruction/rebuild of my CustomGraphics elements

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report