I don't quite understand what you are trying to do. I don't think how you'll be able to print "theVar.name". The value is not defined anywhere in the script.
Well this was a simple demonstration of my problem, in my actual script I was trying to use some UI variables and that was my real problem. But I can just create some global variables from those before the callback. Thanks for the help guys!
Did you try? callbacks.addScript #viewportChange "theFun meshpick.object" id:#theViewCall If you put theFun inside the rollout you can just do: try (destroyDialog theScript) catch()rollout theScript "The Script"( --Filter for pick buttons, makes sure user can only select geometry fn meshFilter obj = superClassOf obj ==…
Hey folks, I'm a little stuck here. I'm trying to get a function to run while the view is changing. But I'm struggling to pass off anything to the function within the callback. This won't work for instance: fn theFun theModel =( print theVar.name as string)try (destroyDialog theScript) catch()rollout theScript "The…