Description

Convert a distance in this calibration's units to another unit.

Return Type

A Double value.  

Syntax

object.ConvertValueToUnit (dfValue, newUnit)

The ConvertValueToUnit Method syntax has these parts:

PartDescription
objectAn expression evaluating to an object of type McSpatialCalib.
dfValueRequired. A Double value.

The distance to convert to the specified units. newVal - A built-in unit type (see Unit for a list)

newUnitRequired. A mcSpatialUnit enumeration, as described in settings.

[out, retval]

Settings

The settings for newUnit are:

ConstantValueDescription
 mcsuPixel0
 mcsuOther1
 mcsuNanometer2
 mcsuMicrometer3
 mcsuMillimeter4
 mcsuCentimeter5
 mcsuMeter6
 mcsuKilometer7
 mcsuInch8
 mcsuFoot9
 mcsuYard10
 mcsuMile11

Remarks

This method can be used to convert a distance measured in this calibration's units to its equivalent in any of the other physical units supported. This conversion cannot take place if the calibration is not currently based on an absolute physical unit from the list given in the Unit property documentation, or is based on the mcsuPixel or mcsuCustom units.