×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How to Draw a Balloon with Leader

How to Draw a Balloon with Leader

How to Draw a Balloon with Leader

(OP)
Hi,

I am new to Autocad. When I used Leader Command to link an object with a balloon (I left Text empty). The leader came with a tail.

I gather it is not the right way to do the job. How should it be done?

R2004

Thanks,

RE: How to Draw a Balloon with Leader

Here is a ballon routine from Catalyst magazine.
Cut and past into an empty notepad session, save as ballon.lsp, the load it and type bln to start the routine.

;Tip1517:  BALLOON.LSP   Ultimate Balloon   (c)1999, Brent Wilkerson

(defun c:BLN (/ PT1 PT2 PT3 ANG TXT CIRSZ OLD_OS DIMSC)
    (setvar "CMDECHO" 0)
    (command "undo" "m" "undo" "g")
    (setq OLD_OS (getvar "OSMODE"))
    (setq PT1 (getpoint "\nLeader Start Point: "))
(while (/= PT1 nil)
    (setq DIMSC (getvar "DIMSCALE"))
    (setq PT2 (getpoint PT1 "\n Bubble Startpoint: "))
    (setq ANG (angle PT1 PT2))
    (setvar "osmode" 0)
    (command "dim1" "leader" PT1 PT2) (command)
  (setq PT3 (getpoint PT2 "\n  Next point (ENTER to stop):"))
  (while (/= PT3 nil)
    (command "LINE" PT2 PT3 "")
    (setq ANG (angle PT2 PT3))
    (setq PT2 PT3)
    (setq PT3 (getpoint PT2 "\nNext point (ENTER to stop):"))
  )

; Adjust circle size near the "5" is times the dimension text height
; times the dimension scale. Adjust the "5" to vary your circle size.
    (setq CIRSZ (* (* DIMSC (getvar "DIMTXT")) 5))
;;
    (command "circle" "2p" PT2 (polar PT2 ANG CIRSZ))
    (setq TXT (getstring T "\n Bubble text: "))
    (command "TEXT" "M"
       (polar PT2 ANG (/ CIRSZ 2)) (* DIMSC (getvar "DIMTXT")) 0 TXT)
    (setvar "OSMODE" OLD_OS)
    (princ "\n*Hit <ENTER> to exit*")
    (setq PT1 (getpoint "\nLeader Start Point: "))
)
    (setq PT1 nil)
    (setvar "OSMODE" OLD_OS)
    (command "undo" "e")
    (setvar "CMDECHO" 1)
   (princ)
)
(princ "\nEnter BLN to start routine.")
(princ)

RE: How to Draw a Balloon with Leader

wzal,

To get a straight line leader without a shoulder stop specifying points after your second one by pressing the enter key.  

RE: How to Draw a Balloon with Leader

This is not quite the same, but if you use DDIM to change the style to "Draw Frame Around Text" which used to be called a "Basic Dimension" then the leader text will have a rectangular box drawn around it.  Your leaders will remain associative and you will have all the advantages of the "balloons" being dimensions.

RE: How to Draw a Balloon with Leader

To suppress the shoulder on the leader line press ESC after selecting the second point.
HTH
Dave

RE: How to Draw a Balloon with Leader

Make a circle with a half inch dia. circle(keeping in mind the drawing scale factor);attach a leader to the balloon; make an attribute of a character(letter or number) and insert it inside the balloon; make the ballon and its inserted character as a block or wblock which can be reinserted and modifies in existing or new drawings.  only use wblocks for new drawings since wblocks can be saved in the same manner as drawing files; also make the attribute before making the block or wblock.

RE: How to Draw a Balloon with Leader

Hi guys,
Try the following code. I have wrote and used it for a long time with no problem.

(defun C:LB( / temp_list p1 p2 p3 n label_text rot_list )
  (setvar "CMDECHO" 0)
  (command "._UNDO" "BE")
  (setvar "CMDECHO" 1)
  (command "._LEADER" pause pause "" "" "N")
  (setq temp_list (entget (entlast)))
  (setq n 16)
  (while (/= (car (nth n temp_list)) 10)
    (setq n (1+ n))
  )
  (setq p1 (cdr (nth n temp_list)))
  (setq p2 (cdr (nth (1+ n) temp_list)))
  (setq p3 (polar p2 (angle p1 p2) 3.0))
  (setq p3 (trans p3 0 1))
  (setvar "CMDECHO" 0)
  (setq old_snap (getvar "OSMODE"))
  (setvar "OSMODE" 0)
  (command "._CIRCLE" p3 3.0)
  (setq label_text (getstring t "\n   Label text : "))
  (command "._TEXT" "J" "M" p3 3.0 0.0 label_text)
  (setvar "OSMODE" old_snap)
  (setq old_snap nil)
  (setq temp_list (entget (entlast)))
  (setq rot_list (assoc 50 temp_list))
  (setq temp_list (subst '(50 . 0.0) rot_list temp_list))
  (entmod temp_list)
  (command "._UNDO" "E")
  (princ)
)



After loading the code, enter the LB command and just pick two positions.
:)
Farzad

RE: How to Draw a Balloon with Leader

how do you guys keep yourselves from making mistakes when .lsp routines are written?.  It seems like it would not be difficult to forget a parenthese here and there.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources