Hi Vicen,
in general, there at least four different sorts of variables you can use in DIAdem scripts. Concerning their initial behaviour, they are behaving differently:
- auxiliary variables. Those you find if you open the DIAdem SCRIPT menu edit -> auxiliary variables. (R1, Rv1,...) They are allocated (and reset) automatically when you start DIAdem. There is no command to reset all of them to the initial states. Since they might be used by different scripts and examples in DIAdem, your program should always start with an initialisation.
- global variables. They behave the same as auxiliary variables, but there is one difference. They are not allocated until you call the globaldim command. Nevertheless, calling globaldim a second time will not reset them to initial values. That is why our program should always start with an initialisation in this case as well.
- VBS variables. These are variables used in the context of the VBS only. You cannot use them in other DIadem panels as SCRIPT. They are allocated and reset each time you start your script. When the script completes executions, these variables are deleted again.
- user variables DIAdem supports the declaration of user variables inside a specific declaration file (*.vas). All variables can be configured to have an initial value and there is a command that can be used to reset them to that value at any time. Refer to "user variables" and the command "uservarreset" in the DIAdem online help.
Ingo Schumacher
Systems Engineering Manager CEERNational Instruments Germany