API_​UnitConversionData

Input and output struct for APIEnv_GetConvertedUnitValueID.

    typedef struct {
        double                       value;
        API_UnitConversionPrefID     unitConvPref;
        GS::uchar_t                  convertedValue[64];
        GS::uchar_t                  extraAccuracy[4];
        GS::uchar_t                  unit[64];
    } API_UnitConversionData;

 

Members

value
[in] Contains the value to convert. It should be in m/m²/m³/radian.
unitConvPref
[in] Specifies the Project Preference, which has to be used for conversion. For the supported values see API_UnitConversionPrefID.
convertedValue
[out] Contains the converted value, in the unit and rounding specified by the Project Preference.
extraAccuracy
[out] Contains the extra accuracy decimals, if any. It may be “1”–”99″, “5”, “25”/”5″/”75″ or the empty string.
unit
[out] Contains the unit of the converted value.

 

Remarks

Angles and imperial measured values can have several units, thus in these cases the unit is left empty, and the unit(s) are concatenated to convertedValue.

 

Requirements

Version: API 20 or later
Header: APIdefs_Environment.h

 

See Also

APIEnv_GetConvertedUnitValueID
API_UnitConversionPrefID
API Types