Make an exception under ClearGlobals()


Hoyer

Recommended Posts

Posted

I would like to use ClearGlobals() while keeping some already defined variables, which are numbers and strings.

I guess I could write them to an external file and read it after the ClearGlobals() command, but I'm curious if there is a cheaper way which I haven't figured yet?

Thank you in advance!

Posted

You could use Test channels instead of global variables for these values.  Set the history to 1.  Use D to A for numbers, and String for strings.  These aren't affected by ClearGlobals().   It won't work with objects, and won't work quite the same with arrays, but for scalar numbers and strings, it is probably the easiest.

Archived

This topic is now archived and is closed to further replies.