NOTE

Deprecated. Use fsVarsIVarGet, fsVarsOVarGet or fsVarsZVarGet instead.

The fsVarsCustomSimVarGet function can be used to get the value of a specific Custom SimVar.

Syntax
FsVarError fsVarsCustomSimVarGet(
    FsCustomSimVarId varId,
    FsUnitId unitId,
    double* result
);
Parameters
ParametersDescription
varIdThe ID of a custom simvar.
unitIdThe ID of a unit (found using fsVarsGetUnitId).
resultThe value that will receive the value of the CustomSimVar.
Return Values

The function returns a FsVarError, 0 means there is no error. In that case, the value of the named variable has been set in result.

Example
FsUnitId unitId = fsVarsGetUnitId("DEGREES");
FsCustomSimVarId varId = fsVarsRegisterCustomSimVar("TOTO", nullptr, FsSimCustomSimVarScopeSim);
double result = 0;
if (fsVarsCustomSimVarGet(varId , unitId, &result) == FS_VAR_ERROR_NONE)
{
    // valid
}
else
{
    // error
}

0/255