defun C:mball
;(IF (= (TYPE F1) 'FILE ) "YES"  (STOP))
;(IF (= (TYPE F2) 'FILE ) "YES" (STOP))
(setvar "Cmdecho" 0)
(setq a (getreal "\n Enter text height: "))
(setq d (getint "\n Enter beginning No: "))
(setq p1 (getpoint "\n Locate point tip: "))
(setq p2 (getpoint "\n Locate balloon center: "))
(SETQ B d)
(SETQ A1 A)
(REPEAT 100
   (IF (< B 100)
      (PROGN
         (command "Text" "c" (list (car p2) (- (cadr p2) (/ a 2))) a "0" (ITOA b))
         (command "circle" p2 (* A 1.2))
         (command "line" P1 (polar p1 (angle p1 p2)
         (- (distance p1 p2) (* A 1.2))) "")
         (command "donut" 0 (* A 0.167) p1 "")
         (SETQ p1 (GETPOINT "\n Locate point tip: "))
         (SETQ p2 (GETPOINT "\n Locate balloon center: "))
         (setq B (+ 1 B))
     )
  )
 (IF (OR (> B 100) (= B 100))
     (PROGN
        (command "Text" "c" (list (car p2) (- (cadr p2) (/ a 2)))
        a "0" (ITOA b))
        (command "circle" p2 (* A 1.6))
        (princ b)
        (command "line" P1 (polar p1 (angle p1 p2)
        (- (distance p1 p2) (* A 1.6))) "")
        (command "donut" 0 (* A 0.167) p1 "")
        (SETQ p1 (GETPOINT "\n Locate point tip: "))
        (SETQ p2 (GETPOINT "\n Locate balloon center: "))
        (setq B (+ B 1))
     )
  )
)

