Command Shortcut Not Appearing in Toolbar for Custom Add-In
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi everyone,
99% of python code is created by ChatGPT. I'm working on a custom Fusion 360 add-in that creates an RHS (Rectangular Hollow Section) profile in the Sketch environment. The add-in works correctly in terms of functionality, but the custom command shortcut doesn't appear in the toolbar as expected.
Here are the details of what I've done:
I added the command to the SolidScriptsAddinsPanel using the following code:
panel = ui.allToolbarPanels.itemById('SolidScriptsAddinsPanel')
panel.controls.addCommand(command_def)
The command_def is created with a button definition, and an icon is provided:
command_def = ui.commandDefinitions.addButtonDefinition(
'createRHSProfile',
'RHS Profile Creation',
'Creates a sketch of an RHS profile',
'resources/createProfileIcon.png'
)
The resources folder is in the same directory as my add-in, and the icon file createProfileIcon.png is 64x64 pixels and in PNG format.
I verified that the add-in is running successfully through the Add-ins Manager, and the functionality works as expected. However, the shortcut still doesn’t appear on the toolbar.
Could someone help me understand why the shortcut isn’t appearing in the toolbar? Is there an additional step or setting required to make it visible?
Thanks in advance for your assistance!