This document is archived and information here might be outdated.  Recommended version.


IUnitConverter.ConvertUnits Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > System > ESRI.ArcGIS.esriSystem > Interfaces > IU > IUnitConverter Interface > IUnitConverter.ConvertUnits Method
ArcGIS Developer Help

IUnitConverter.ConvertUnits Method

Convert Esri units.

[Visual Basic .NET]
Public Function ConvertUnits ( _
    ByVal dValue As Double, _
    ByVal inUnits As esriUnits, _
    ByVal outUnits As esriUnits _
) As Double
[C#]
public double ConvertUnits (
    double dValue,
    esriUnits inUnits,
    esriUnits outUnits
);
[C++]
HRESULT ConvertUnits(
  double dValue,
  esriUnits inUnits,
  esriUnits outUnits
);
[C++]
Parameters
dValue [in]

dValue is a parameter of type double inUnits [in]
inUnits is a parameter of type esriUnits outUnits [in]
outUnits is a parameter of type esriUnits

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Description

Converts the specified numeric data value from one unit of measure to another unit of measure. 

Remarks

If the input unit is meters and the output unit is decimal degrees, IUnitConverter converts the distance in meters along the equator to the equivalent number of decimal degrees. For example, if the distance in meters is half the circumference of the earth at the equator, IUnitConverter will return 180 decimal degrees. 

See Also

IUnitConverter Interface