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.
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How To Trigger Event From Add-In At Regular Time Intervals (Every Second / Minute)?

Message 1 of 5
187 Views, 4 Replies

How To Trigger Event From Add-In At Regular Time Intervals (Every Second / Minute)?

Is it possible through the Fusion 360 API to create an add-in or script that does something at a regular time interval like every second or every minute? I haven't seen anything like that in the examples and I don't know which object or method to look for.

I would love to be able to update things in almost real time. For instance I would like to make a kaleidoscope sketch tool which creates a number of radial mirrors that update continuously to mirror every line or curve you create immediately. 

This would need to not tie up Fusion's GUI, and would need to let the user do things while/between the triggers/updates.

Is something like this possible, and if so, where should I start?


Message 2 of 5

Yes, it is definetely possible, what you would need to do is create a seperate thread running on a loop and using a custom event to make API calls. See this page for more information.

Message 3 of 5

Message 4 of 5

Awesome, thank you. I did not know that Fusion supported multi-threading. This should open up many possibilities for me.
Message 5 of 5

Fusion should be considered a single-threaded application. This is entirely true because there are a few things that it will spawn a new thread for some processing but that is the exception. Almost all of Fusion runs within a single thread. This includes the user interface and the API. They all run in the main Fusion thread.  You can do some external processing that doesn't involve Fusion in a separate thread and then for that thread to communicate with your add-in running in the main thread you can use the Custom Event functionality.

Brian Ekins
Inventor and Fusion 360 API Expert

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