home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Black Box 4
/
BlackBox.cdr
/
autocad
/
jul91.arj
/
TIP679.LSP
< prev
Wrap
Lisp/Scheme
|
1991-08-27
|
2KB
|
79 lines
;TIP679.LSP Get* Function Library (c)1991, Norman Taylor
(defun XGETANGLE (P0 P D)
(setq P (strcat "\n** " P " <"
(angtos D) ">: "))
(if P0
(cond ((getangle P0 P)) (D))
(cond ((getangle P)) (D))
)
)
(defun XGETCORNER (P0 P D / Z)
(setq Z (if (caddr D)(strcat ","
(rtos (caddr D))) "")
P (strcat "\n** " P " <" (rtos
(car D)) "," (rtos (cadr D))
Z ">: ")
)
(cond ((getcorner P0 P))(D))
)
(defun XGETDIST (P0 P D)
(setq P (strcat "\n** " P " <" (rtos D)
">: "))
(if P0 (cond ((getdist P0 P))(D))
(cond ((getdist P))(D))
)
)
(defun XGETINT (P D)
(cond ((getint (strcat "\n** " P " <"
(itoa D) ">: ")))(D))
)
(defun XGETKWORD (OL P D / K O X)
(setq K "" O "")
(foreach X OL
(setq K (strcat K " " X)
O (if (/= X D)
(strcat O "/" X)
O
)
)
)
(initget (substr K 2))
(cond ((getkword (strcat "\n** " P
(substr O 2) "/<" D ">: ")))(D))
)
(defun XGETORIENT (P0 P D)
(setq P (strcat "\n** " P " <"
(angtos D) ">: "))
(if P0 (cond ((getorient P0 P))(D))
(cond ((getorient P))(D))
)
)
(defun XGETPOINT (P0 P D)
(setq P (strcat "\n** " P " <" (rtos
(car D)) "," (rtos (cadr D))
(if (caddr D)
(strcat "," (rtos (caddr D))) ""
)
">: "))
(if P0 (cond ((getpoint P0 P))(D))
(cond ((getpoint P))(D))
)
)
(defun XGETREAL (P D)
(cond ((getreal (strcat "\** " P " <"
(rtos D) ">: ")))
(D)
)
)
(defun XGETSTRING (CR P D)
(setq S (getstring CR (strcat "\n** "
P " <" D ">: "))
N (strlen S)
J 1
)
(while (and (<= J N)(/= (substr S J 1)
" "))(setq J (1+ J)))
(cond ((> J 1)(substr S 1 (1- J)))(D))
)