Converts a real
(double) value to a string.
Signature
VBA : RetVal =
object.RealToString(Value, Unit, Precision)
VL : RetVal = (vla-RealToString
object Value Unit Precision)
(vla-RealToString util thereal
acdecimal 3)
-
Object : Utility
The object or objects this method applies to.
-
Value : Double;
input-only
The value to be converted.
-
Unit : AcUnits
enum; input-only
acDefaultUnits
acScientific
acDecimal
acEngineering
acArchitectural
acFractional
-
Precision :
Integer; input-only
The precision of the value. An integer between 0 and 8.
-
RetVal : String
The value as a properly formatted string.
Example :
(defun c:al-realtostring ()
(vl-load-com)
(setq util (vla-get-utility
(vla-get-activedocument
(vlax-get-acad-object))))
(setq thereal (vla-GetReal util "\nEnter Real Number : "))
(setq thestring (vla-RealToString util thereal acdecimal 3))
(prin thestring)
(princ)
);defun
|
|