Converts a value from one unit of measurement to another
(cvunit value from-unit to-unit)
Arguments
The numeric value or point list (2D or 3D point) to be converted.
The unit that value is being converted from.
The unit that value is being converted to.
The from-unit and to-unit arguments can name any unit type found in the acad.unt file.
Return Values
nil, if either unit name is unknown (not found in the acad.unt file), or if the two units are incompatible (for example, trying to convert grams into years).
The converted value, if successful; otherwiseExamples
Command: (cvunit 1 "minute" "second")
60.0
Command: (cvunit 1 "gallon" "furlong")
nil
Command: (cvunit 1.0 "inch" "cm")
2.54
Command: (cvunit 1.0 "acre" "sq yard")
4840.0
Command: (cvunit '(1.0 2.5) "ft" "in")
(12.0 30.0)
Command: (cvunit '(1 2 3) "ft" "in")
(12.0 24.0 36.0)
Unit Conversion topic in the AutoLISP Developer's Guide.
The