The fsVarsGetUnitId function can be used to get the FsUnitId of a specific unit using its name.

Syntax
FsUnitId fsVarsGetUnitId(
    const char* unitName
);
Parameters
ParametersDescription
unitNameThe name of the unit.
Return Values

The function returns ID associated with the given unit name. If an error occurred, the function will return FS_INVALID_UNIT.

Example
FsUnitId unitId = fsVarsGetUnitId("DEGREES"); // valid
FsUnitId wrongUnitId = fsVarsGetUnitId("toto"); // returns -1

0/255