HyperWorks Tools

::hwat::utils::ConvertUnits

::hwat::utils::ConvertUnits

Previous topic Next topic No expanding text in this topic  

::hwat::utils::ConvertUnits

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

NAME

::hwat::utils::ConvertUnits - Converts units from one format to another.

 

SYNTAX

::hwat::utils::ConvertUnits:: units_in units_out {base_value 1}

 

ARGUMENTS

Units_in

A string that describes the units you want to convert from.

Units_out

A string that describes the units you want to convert to.

base_value

[optional] value of the "from" to convert to the "to".

 

RETURNS

The conversion value to multiply the “in” values by to get the “out” value. {} on failure.

 

EXAMPLE

::hwat::utils::ConvertUnits “4 mph” “mm\/ms”

 

Comments

Be sure to escape any forward slashes with a preceding backslash.

Not passing a base_value is the same as passing 1 for the base_value.

 

See also

Utils Functions