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: 

Error Encountered when Opening Fusion 360 caused by add-on

1 REPLY 1
Reply
Message 1 of 2
hyweric
93 Views, 1 Reply

Error Encountered when Opening Fusion 360 caused by add-on

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

1 REPLY 1
Message 2 of 2
BrianEkins
in reply to: hyweric

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

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

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report