taffcad
Mechanical
- May 27, 2004
- 49
Hi To all you Lisp Gurus
I have a lisp routine that I would like the text size to be changed on the command line prompt. The 3rd line says about txt height and getvar? Is the answer already there and am I missing something.
Any help would be great.
Thanks
Taffcad
(defun c:AUTONUM ()
(setvar "cmdecho" 0)
(if (null txtht) (setq txtht (* 0.125 (getvar "ltscale"))))
(setq pt1 (getpoint "\nSelect starting point: "))
(setq n1 (getint "\nEnter first number: "))
(setq n2 (getint "Enter last number: "))
(setq inc (getint "Enter increment: "))
(setq drctn (getint "Enter 1 for hor, 2 for vert, 3 for angle: "))
(setq vfeed (getreal "Enter distance between numbers: "))
(setq hfeed vfeed)
(if (= drctn 1) (setq vfeed 0))
(if (= drctn 2) (setq hfeed 0))
(while (<= n1 n2)
(command "text" "c" pt1 txtht "0" n1)
(setq pt1 (list (+ hfeed (car pt1)) (+ vfeed (cadr pt1))))
(setq n1 (+ n1 inc))
I have a lisp routine that I would like the text size to be changed on the command line prompt. The 3rd line says about txt height and getvar? Is the answer already there and am I missing something.
Any help would be great.
Thanks
Taffcad
(defun c:AUTONUM ()
(setvar "cmdecho" 0)
(if (null txtht) (setq txtht (* 0.125 (getvar "ltscale"))))
(setq pt1 (getpoint "\nSelect starting point: "))
(setq n1 (getint "\nEnter first number: "))
(setq n2 (getint "Enter last number: "))
(setq inc (getint "Enter increment: "))
(setq drctn (getint "Enter 1 for hor, 2 for vert, 3 for angle: "))
(setq vfeed (getreal "Enter distance between numbers: "))
(setq hfeed vfeed)
(if (= drctn 1) (setq vfeed 0))
(if (= drctn 2) (setq hfeed 0))
(while (<= n1 n2)
(command "text" "c" pt1 txtht "0" n1)
(setq pt1 (list (+ hfeed (car pt1)) (+ vfeed (cadr pt1))))
(setq n1 (+ n1 inc))