Hi guys.. o)
Doing some scripting where I need to reset some global scoped variables whenever the script addin is reloaded or changed externally.
The script leaves variables in an inconsistent state whenever there was an error (which can happen, especially while developing things).
OnInit() is too early, since "Script" is not existent yet. OnStartup() does not fire unless DO is restarted and the other events also don't seem to help out. Putting something like the below in the global scope does not work either, since it's going run for any event or command and interferes with properly working internals of the addin.
Running
if (typeof Script !== "undefined"){
Reset();
}
Any ideas? Thanks! o)