Message 1 of 5
How to Exit / Stop Fusion API Script From Within Script (Throw Fatal Error)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, is it possible to throw an exception that will end/stop a Fusion 360 API script? Basically, I want to check something (for instance a folder directory given by a user) and if they give a bad path, exit the entire Fusion script (or stop the Run function) from within a function block. I've tried sys.exit() but it's not working as expected. I know the ui.inputBox has a cancel method that can exit the script so it would be great to be able to do something like that.
Thanks!