GetReal Method

Back to Methods Reference

Gets a real (double) value from the user.


VBA : RetVal = object.GetReal([Prompt])

VL : RetVal = (vla-GetReal object Prompt)

(vla-GetReal util "\nEnter Real Number : ")

  • Object : Utility
    The object or objects this method applies to.

  • Prompt : Variant (string); input-only; optional
    The text used to prompt the user for input.

  • RetVal : Double
    The value returned from the user.


AutoCAD pauses for user input of a real value, and sets the return value to the value that the user enters. The Prompt parameter specifies a string that AutoCAD displays before it pauses. The prompt is optional.

If a keyword is returned instead of a double, AutoCAD will generate the error message "User input keyword." Use the GetInput method to obtain the keyword from the return value.

Example :

(defun c:al-getreal ()


(setq util (vla-get-utility 
(setq thereal (vla-GetReal util "\nEnter Real Number : "))

(princ thereal)



The AutoLisp/Visual Lisp/VBA Resource Website
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