fsVarsZVarGet
The fsVarsZVarGet function can be used to get the value of a specific ZVar.
Syntax
FsVarError fsVarsZVarGet(
FsZVarId zVarId,
FsUnitId unitId,
double* result,
FsObjectId target
);
Parameters
| Parameters | Description |
|---|---|
zVarId |
The ID of an |
unitId |
The ID of a unit (found using fsVarsGetUnitId). |
result |
The variable that will receive the value of the ZVar (if the other parameters are correct). |
target |
The ID of the object from which the variable is being retrieved. Possible targets are:
Default: |
Return Values
The function returns FsVarError, where 0 means there is no error (in which case, the value of the ZVar has been set in result).
Example
FsUnitId unitId = fsVarsGetUnitId("DEGREES");
FsZVarId zVarId = fsVarsRegisterZVar("Toto");
double result = 0;
if (fsVarsZVarGet(zVarId, unitId, &result) == FS_VAR_ERROR_NONE)
{
// valid
}
else
{
// error
}