Toolbar icon for addin script ?

Toolbar icon for addin script ?

info83PHN
Advocate Advocate
518 Views
2 Replies
Message 1 of 3

Toolbar icon for addin script ?

info83PHN
Advocate
Advocate

I know I can assign a keyboard shortcut and then open the 'scripts and add-ins' window.

 

Is there a way to either add a keyboard shortcut to a specific add-in script, or add a toolbar icon / button linked to a script that is used very often ?

0 Likes
519 Views
2 Replies
Replies (2)
Message 2 of 3

kandennti
Mentor
Mentor

Hi @info83PHN .

 

As with the normal command, Hotkey could be set for any add-in in the activated state.

https://forums.autodesk.com/t5/fusion-360-api-and-scripts/is-there-anyway-to-assign-a-script-or-add-... 

 

However, at the time of the link, Hotkey seemed to be available even after restarting, but with Ver. 2.0.15027, Hotkey will no longer function.

"Change Keyboard Shortcut..." the settings were still there, but they did not respond as Hotkey.

 

0 Likes
Message 3 of 3

BrianEkins
Mentor
Mentor

There isn't a way to set up a button for a basic script. It would be a nice feature to have.

 

What is possible is to create an add-in instead of a script. Add-ins are automatically run when Fusion starts, where they can create a command and add a button to the UI. When the button is clicked, the desired action takes place. This increases the complexity of the code quite a bit but is supported today. Another advantage you get with a command is the actions are all combined into a single undo.

---------------------------------------------------------------
Brian Ekins
Inventor and Fusion 360 API Expert
Website/Blog: https://EkinsSolutions.com
0 Likes