Skip to content

Instantly share code, notes, and snippets.

@arnaudin
Created February 23, 2016 22:45
Show Gist options
  • Save arnaudin/8b71aab7e73960de0456 to your computer and use it in GitHub Desktop.
Save arnaudin/8b71aab7e73960de0456 to your computer and use it in GitHub Desktop.
Fusion 360 add-in template
import adsk.core, adsk.fusion, traceback
def run(context):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
ui.messageBox('Hello addin')
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
def stop(context):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
ui.messageBox('Stop addin')
except:
if ui:
ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment