I'm trying to update the old balloon lisp to incorporate turning off ortho and osnap and turn them back to their original state after the routine finishes. It's not working for me for some reason. I'd also like it to make the arrow and line one piece like the qleader but I have no idea how to do that. And I'd like it to use the osnap "nearest" as the default pick point if that's possible.
I know there's a much newer Ballons lisp routine that is much more advanced and I may use that one once in a while if I need the balloon to be a polygon but this one is much faster to use.
Code:
(defun c:b ()
(setq *CMD* (getvar "cmdecho")
*ORT* (getvar "orthomode")
*OSM* (getvar "osmode")
)
(setvar "cmdecho" 0)
(setvar "orthomode" 0)
(setvar "osmode" 0)
(setq ds (getvar "dimscale"))
(initget 1) (setq p1 (getpoint "\nFrom point: "))
(command "_nea")
(initget 1) (setq p2 (getpoint p1 "\nTo point: "))
(if (<= (car p2) (car p1)) (setq b (* -0.375 ds))
(setq b (* 0.375 ds)))
(setq p3 (list (+ (car p2)(/ b 4)) (cadr p2)))
(setq p4 (list (+ (car p3) (/ b 2)) (cadr p3)))
(command "dim1" "leader" p1 p2 p3 ^C^C)
(command "circle" p4 (/ (abs b) 2))
(initget 1) (setq c (getstring t "\nText for bubble: "))
(command "text" "m" p4 (* 0.094 ds) 0 c) (princ))
(setvar "orthomode" *ORT*)
(setvar "osmode" *OSM*)
(setvar "cmdecho" *CMD*)
Any help is greatly appreciated! TIA
Scott