Units_Convert
Convert a value from one unit to another.
Syntax
Units_Convert <ScenarioPath> {Date | Unit} <Parameters>
Related commands
Description
The Units_Convert command is used to convert a value from one unit to a different unit within a dimension.
The format of the Units_Convert Date is as follows:
Units_Convert <ScenarioPath> Date {FromUnit} {ToUnit} "<InputValue>"
The format of the Units_Convert Unit is as follows:
Units_Convert <ScenarioPath> Unit {DimensionName} {FromUnit} {ToUnit} "<InputValue>"
The following table describes the command parameters.
Parameter | Description |
---|---|
{DimensionName} | Enter the dimension of the value being converted. (Not valid for Units_Convert Date command.) |
{FromUnit} | Enter the unit name or abbreviation of the <InputValue>. |
{ToUnit} | Enter the unit name or abbreviation that the <InputValue> will be converted to. |
<InputValue> | The value being converted. |
Any {FromUnit}, {ToUnit}, or <InputValue> that contains spaces must be enclosed in double quotes.
Use the Units_Get command to get the available dimensions and current unit settings for those dimensions.
Use the Units_Get command with the UnitNames option to get valid unit names for a specified dimension.
Examples
To convert a gregorian date to YYYY:MM:DD:
Return message
2005:07:01:12:00:00.000
Examples
To convert a distance from meters to kilofeet:
Return message
0.499738
Examples
To convert an angle from degrees to arc seconds:
Return message
91080.000000
Return message
Group membership
This command belongs to the following group(s):
Version
10.1