def stop(context):
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface
        ui.messageBox('Finished')
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
def stop(context):
    try:
        app = adsk.core.Application.get()
        ui = app.userInterface
        ui.messageBox('Finished')
    except:
        if ui:
            ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))