(Graphscr)
(DEFUN c:balloon() (setvar "Cmdecho" 0)
(setq a1 (* (getvar "dimtxt") (getvar "dimscale" )))
(setq a (* a1 1.25))
(setq d (getint "\n Enter beginning No: "))
(setq p1 (getpoint "\n Locate arrow tip: "))
(SETVAR "OSMODE" 512)
(setq p2 (getpoint "\n Locate balloon center: "))
(SETVAR "OSMODE" 0)
(SETQ B d)
(REPEAT 30
(setq x0 (car p1 ) y0 (cadr p1))
(setq x1 (car p2 ) y1 (cadr p2))
(setq x (abs (- x1 x0)))
(setq y (abs (- y1 y0)))
(if (> x y )
(setq p5 (list (car p2) (cadr p1))))
(if (> y x )
(setq p5 (list (car p1) (cadr p2)))
)
(command "Text" "c" (list (car p5) (- (cadr p5) (/ a 2)))
a "0" (ITOA b))
(setvar "textsize" (* 3.0 (getvar "dimscale")))
(setq g (+ a 1.0))
(princ b)
(command "circle" p5 (+ a 1.0))
(command "line" P1 (polar p1 (angle p1 p5)
(- (distance p1 p5) g)) "")
(command "donut" 0 (* 1.5 (GETVAR "DIMSCALE")) p1 "")
(SETQ p1 (GETPOINT "\n Locate arrow tip: "))
(SETVAR "OSMODE" 512)
(SETQ p2 (GETPOINT "\n Locate balloon center: "))
(SETVAR "OSMODE" 0)
(setq B(+ 1 B))) (setvar "Blipmode" F))
