#^u in LISP?
2 messages in this thread
Tony,
I found this little routine on a PC running AutoCAD, and I can't
understand what the ^u is doing in the file. There are two of them, here's
one:
;FILE NAME: arrow.lsp
;========================================================== (defun C:ARROW
()
(setq *error* mherror)
(savevars "CMDECHO")
(setvar "CMDECHO" 0)
(savevars "clayer")
(makel "TEXT100")
(setq from (getpoint "\nArrow Start at: "))
(setq to (getpoint from "\nArrow Ends at: "))
(command "dim" "leader" from to ^u)
; HELP !!!!! The above line is driving me crazy
(command "exit")
(setq x (- (car from) (car to)))
(setq x (/ x 2.))
(setq y (- (cadr from) (cadr to)))
(setq y (/ y 2.))
(setq a (angle from to))
(setq centre (list (- (car from) x) (- (cadr from) y)))
(setq pipi (/ pi 2.))
(setq centre2 (polar centre (+ a pipi) 10))
(command "mirror" from "" centre centre2 "n")
(setvar "CMDECHO" 0)
(resetvars)
(princ) )
I have no idea where it came from, someone programmed it in and I was
just helping out…
Mark <Baffled?> Kurdi
Mark – Well, that's not a valid argument to (command). It looks like the
programmer was trying to "Undo" the first leader segment, in which case,
you should replace that expression with this one:
(command ".dim" "lea" from to "u")
-TonyT.