APIEnv_​GetConvertedUnitValueID

Returns the value of a physical property (length/area/volume/angle) in the unit of the given Project Preference.

    GSErrCode ACAPI_Environment (
        APIEnv_GetConvertedUnitValueID,
        API_UnitConversionData*       api_unitConvData
    );

 

Parameters

api_unitConvData
[in/out] You can specify in it the value to convert, and the Project Preference with which to convert. The environment function returns the converted value, extra accuracy and unit string in the same struct.

 

Return Values

NoError
The function has completed with success.
APIERR_BADPARS
api_unitConvData is nullptr, or api_unitConvData->unitConvPref is invalid.

For other common API errors see the API Errors document.

 

Remarks

api_unitConvData->value has to be given in m/m²/m³/radian. The converted value will be returned in string format, as it would appear in Archicad.

 

Requirements

Version: API 20 or later
Header: APIdefs_Environment.h

 

See Also

API_UnitConversionData
ACAPI_Environment
API Functions