Declares global variables and reserves memory space for these variables. Global variables are valid and retain their contents as long as DIAdem is running and you do not restart the script engine.
||Specifies the name of a global variable.
You can access global variables in all DIAdem panels, in scripts, and in dialog boxes. Use the syntax @@MyVar@@, for example, when you want to display the global variable MyVar in a text.
||Note To delete global variables, you must restart the script engine with the ScriptCmdReset command.|
||Note You also can define global variables in user command files. Declare the variable in the global range outside a function and register this user command file.|
||Note Use the GlobalRedim command to declare global dynamic arrays.|
||Note Use ItemInfoGet to check whether the variable already exists and whether the GlobalDim commands has executed it.|
The following example defines the scalar variable MyVar and the array variable MyArray as global variables. The command GlobalDim is only executed if the variable MyVar does not already exist.
If Not Iteminfoget("MyVar") Then
Call GlobalDim("MyVar, MyArray()")