Error Encountered when Opening Fusion 360 caused by add-on

Error Encountered when Opening Fusion 360 caused by add-on

hyweric
Explorer Explorer
361 Views
1 Reply
Message 1 of 2

Error Encountered when Opening Fusion 360 caused by add-on

hyweric
Explorer
Explorer

When I just start up Fusion, I get this error caused by the add-on I'm working on. It doesn't happen when I run the script but when I downloaded it from the Testing Site on F360, the errors will appear in the startup sequence. 

 
unnamed.png
 

I think it's possible to just do nothing in the except statement so it doesn't print the error although I'm unclear if there is an underlying error. Here is the code around that region. Is there a way to fix the error? 

 

Screenshot 2024-03-06 at 10.40.56 AM.png

0 Likes
362 Views
1 Reply
Reply (1)
Message 2 of 2

BrianEkins
Mentor
Mentor

The reason for the error is that at the time the add-in is loaded, no documents are open, and as a result, there is no Design available, and the activeProduct property is failing. You shouldn't try to get the activeProduct until the user runs the command associated with the add-in.

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