GetVarMetadata
(Engine-Level Function)
| Description: |
Every variable object contains an embedded value. This function is used to retrieve those values. |
| Warning: |
This function should be used only by advanced programmers. |
| Returns: |
Varies |
Usage:  |
Script Only. |
| Function Groups: |
Dictionary, Variable |
| Related to: |
SetVarMetadata | FindVariable | AddVariable |
Format:  |
GetVarMetadata(Variable) |
| Parameters: |
|
| Variable |
| Required. A variable handle, such as would be returned from the FindVariable or AddVariable functions. |
| Comments: |
Commonly used in conjunction with SetVarMetadata, FindVariable or AddVariable. Note that type data for each variable is stored within the variable using metadata. |
Example:
<
TestMod
[
X;
Y;
Var;
]
Main [
If ! Valid(X);
[
X = "This is the value of X"
Var = FindVariable("X", Self(), 0, 0);
SetVarMetadata(Var, "This is the metadata in variable X");
Y = GetVarMetadata(Var);
]
ZText(50, 100, Concat("X: ", X), 14, 0);
ZText(50, 120, Concat("Y: ", Y), 14, 0);
]
>
Trihedral and VTScada are registered trade marks of Trihedral Engineering Limited
© Trihedral Engineering Limited 1987- 2025 All rights reserved.