RealToString Method

Back to Methods Reference

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

 
The AutoLisp/Visual Lisp/VBA Resource Website
Google
Search the WWW Search AfraLisp

Copyright © 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website