The fsVarsGetBVarId function can be used to get the FsBVarId of a specific BVar using its name and its preset.

Syntax
FsBVarId fsVarsGetBVarId(
    const char* bVarName,
    bool callable,
    FsObjectId target
);
Parameters
ParametersDescription
bVarNameThe name of the BVar and optionally its preset ("name[_preset]").
callableA boolean indicating if the BVar can be called.
targetThe ID of the object from which the variable is being retrieved. Default: FS_OBJECT_ID_USER_AIRCRAFT.
Return Values

The function returns the correct ID associated to the given name. If an error occurred, the function will return FS_VAR_INVALID_ID.

Example
FsBVarId BVarId = fsVarsGetBVarId("AUXILIARY_SUNSHADE_ADJUST_PILOT", false); // valid in DA62
FsBVarId BVarId = fsVarsGetBVarId("AUXILIARY_SUNSHADE_ADJUST_PILOT", true); // NOT valid in DA62, this preset is not callable
FsBVarId BVarId = fsVarsGetBVarId("AUXILIARY_SUNSHADE_ADJUST_PILOT_TOGGLE", false); // valid in DA62
FsBVarId BVarId = fsVarsGetBVarId("AUXILIARY_SUNSHADE_ADJUST_PILOT_TOGGLE", true); // valid in DA62
FsBVarId BVarId = fsVarsGetAVarId("toto"); // NOT valid in DA62, doesn't exists

0/255