a guestion about "getpoint"

homhsu

Usenet Archive
Joined
Sep 14, 2003
Messages
5
Reaction score
0
(getpoint "input a point : ")

if user input an int such as 222, CAD will return a point such as (199.698 -96.9774 0.0) .

Why this happens?
How to prevent this kind of error?

thanks homling pen
 
This is not an error. The point returned (in your example) would be 222 units in the direction the crosshairs were from the last point entered. There might be an easier way but here is my first thought to prevent this.

;;;Ken Alexander
;;;Allows only point to be
;;;picked on screen
;;;Usage:
;;;(get_only_pnt "Get first point: ")

(defun get_only_pnt (txt / a)
(while (= 'str
(type
(progn
(initget 135)
(setq a (getpoint txt))
)
)
)
)
a
)

Ken Alexander
 

Latest threads

Back
Top