Tutorial crashes

Tutorial crashes

eric
Contributor Contributor
565 Views
2 Replies
Message 1 of 3

Tutorial crashes

eric
Contributor
Contributor

I went to here

https://help.autodesk.com/view/fusion360/ENU/?guid=GUID-3922697A-7BF1-4799-9A5B-C8539DF57051

 

The code "Basic Add-in Command" Crashes when run, please see the attached image.

Any ideas where I could get a example of creating a basic add in command which does not crash?

 

Thanks

 

 

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

marshaltu
Autodesk
Autodesk

Hello,

 

The error message said the icons for your command were missing. Its path was "./Resources/Sample". Unfortunately we didn't put those icons into the page to download.

 

You may have to create icons by yourself or copy existing icons to the folder to make the addin work. You can probably find some icons under C:\Users\<User>\AppData\Local\Autodesk\webdeploy\production\<GUID>\Python\AddInSamples\AddInSample\resources .

 

Thanks,

Marshal



Marshal Tu
Fusion Developer
>
0 Likes
Message 3 of 3

JeromeBriot
Mentor
Mentor

Hello,

 

another quick solution is to remove the folder path from the addButtonDefinition command:

 

        # Create a button command definition.
        buttonSample = cmdDefs.addButtonDefinition('MyButtonDefIdPython',
                                                   'Python Sample Button',
                                                   'Sample button tooltip',
                                                   '')

Then the menu appears without the icon.

 

0 Likes