See also: ConvFuelUnits


ConvUnits(FromUnitName, ToUnitName)


This functions returns the numeric conversion factor used to convert from one unit to another. ConvUnits requires two parameters, each of which must be the name or abbreviation of a unit.  The first parameter must be the source unit (converted from), the second parameter must be the destination unit (converted to). Both parameters must specify units of the same class (e.g. mass, volume or energy).

See the General: Units screen for the list of unit names and abbreviations.

Tip: the easiest way to use this function is using the Enter data in another unit..  option accessed from orange button attached to each expression. This lets you select a unit for data entry and then shows a dialog box where you can enter a value in that unit.  Once you click OK in that dialog, LEAP will construct an expression that utilizes the ConvUnits or ConvFuelUnits function to convert that value back into the units expected for the expression.


ConvUnits(GJ, MJ) = 1000
ConvUnits(GJ, MJ) = 0.001
ConvUnits(GW-HR, GJ) = 3600
ConvUnits(KG, LB)  = 2.2051