ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.Geometry Namespace / LinearUnit Class / ConvertToMeters Method
Distance in the units of this instance.
Example

In This Topic
    ConvertToMeters Method
    In This Topic
    Converts a value in the unit of this instance to meters.
    Syntax
    public double ConvertToMeters( 
       double distance
    )
    Public Function ConvertToMeters( _
       ByVal distance As Double _
    ) As Double

    Parameters

    distance
    Distance in the units of this instance.

    Return Value

    Distance converted to meters.
    Example
    LinearUnit - Convert between feet and meters
    // convert 10 feet to meters
    double metres = LinearUnit.Feet.ConvertToMeters(10);
    
    // convert 20 meters to feet
    double feet = LinearUnit.Feet.ConvertFromMeters(20.0);
    LinearUnit - Convert between centimeters and millimeters
    // convert 11 centimeters to millimeters
    double mm = LinearUnit.Centimeters.ConvertTo(11, LinearUnit.Millimeters);
    
    // convert the result back to centimeters
    double cm = LinearUnit.Millimeters.ConvertTo(mm, LinearUnit.Centimeters);
    
    // convert the millimeter result back to meters
    double meters = LinearUnit.Millimeters.ConvertToMeters(mm);
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also