Why don’t you just add this file to the list of scripts that Rhino loads when it starts (Tools -> Options -> RhinoScript). Then on your button, just run the ‘main’ function.
Alright, will do if there is no other way, thanks for the suggestion.
I still would like to find out why copy pasting the script in the command box isnt working… It happens with many scripts I try actually.
It all depends what you put on a button. If copy/paste the entire script file in between a RunScript() statement on a button, then the entire script file is going to be ‘run’, which basically redefines all of the functions every time you click.
Like I said, add the script file to the list of startup up scripts (as the script was designed to be). Then make simple buttons to run the subroutines.