GetRegistry
The GetRegistry function allows a script to retrieve a value from the Geo SCADA User Registry.
You might be asked to refrain from changing User Registry settings while your Geo SCADA Expert system is in the process of being upgraded.
From Geo SCADA Expert 2019 onwards, the location from which the value is retrieved varies, depending on the type of client from which the function is called and the user that is logged onto that client:
- To use the function on a ViewX or Virtual ViewX client, you have to be logged on via a Geo SCADA Expert User Account. When you call the function, the value is retrieved from the database, where it is stored as part of your Geo SCADA User Registry. (The value is stored as part of your Geo SCADA Expert User Account.)
This function will just return the default value when accessing the database as the Guest User account, or when logged on as the Super User, on a ViewX Client. This is because the value is only cached with such users, and does not get written to a User Account.
- With Original WebX, the value is retrieved from the Windows Registry on the local client machine. The registry entry is specific to the Windows user account that is currently logged on to that client machine. The location is typically:
HKEY_CURRENT_USER\Software\Schneider Electric\ClearSCADA\ViewX/Mimics
| Syntax |
GetRegistry (Name, Default) |
| Description |
Reads a value from the Geo SCADA User Registry, which comprises part of the logged on user's Geo SCADA Expert User Account in the database (or the Windows Registry on the client machine if using Original WebX). |
| Arguments |
Name {string} The Name identifies the registry entry that is to be read by the script. The Name that you enter in your script has to match the name of the required entry in the registry. Default {string or integer} The Default value is an optional variant. It is used to define the value that the function will use if the above entry does not exist in the registry. |
| Returns |
Returns a string or integer value from the registry. |
Example:
RegValue = GetRegistry("CoreReg", 17)
This sets the RegValue variable (defined earlier in the script) to have the same value as the value stored for the "CoreReg" entry in the registry. If the script cannot find the specified entry in the registry, the value 17 is used instead (additionally, if using the function from an Original WebX client, a "CoreReg" entry with a value of 17 is created in the Windows Registry).
Further Information
If required, an administrator can clear a user's registry settings: see Clear User Registry in the Geo SCADA Expert Guide to Security. (The registry values are cleared immediately. However, with a user that is currently logged on to Geo SCADA Expert, the registry changes will only become apparent the next time that they log on.)