;This function is freeware courtesy of the author's of "Inside AutoLisp" for rel. 10 published by New Riders Publications. This credit must accompany all copies of this function. ; ;* UDIST User interface function ;* BIT (0 for none) and KWD key word ("" for none) are same as for INITGET. ;* MSG is the prompt string, to which a default real is added as (nil ;* for none), and a : is added. BPT is base point (nil for none). ;* (defun udist (bit kwd msg def bpt / inp) (if def (setq msg (strcat "\n" msg " <" (rtos def) ">: ") bit (* 2 (fix (/ bit 2))) );setq (setq msg (strcat "\n" msg ": ")) );if (initget bit kwd) (setq inp (if bpt (getdist msg bpt) (getdist msg) ) );setq&if (if inp inp def) );defun ;* (princ) ;*