×
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

balloons

balloons

balloons

(OP)

 When I used Autocad 12 in the old days(good old Dos) I had a piece of software called I think Ballona which allowed me to add leaders with ballons or circles for detailing my assembles, is it possible to do this in Autocad 2002.

    thanks in advance all thwe best from scotland. Jim  

RE: balloons

Dear jimp178,

The below autolisp routine adds a new command to your drawing session. The command's name is LL.
Enter the command LL and pick two points. A leader and a circle will be drawn and then you should enter a number to display in the balloon. The text is created in current text style.

(defun C:LL( / 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)
)

If you need to change some dimensions of balloon or some other modifications, let me know about it.
:)
Farzad

RE: balloons

Here's a lisp file that was used in release 12 to 2002.
The text is created in current text style.  The text height is 3/32 and the bubble size is 1/4.  This text height is based on not having a height assigned to a text style.

(defun C:BUBTAG (/ bs bsr txsz lea txt p tp p1 p2 p3 ang osmod)
  (setq bs   0.25)       ; Bubble Size
  (setq txsz 0.09375)    ; Text Size
  (setq bs (* (getvar "dimscale") bs)
        txsz (* (getvar "dimscale") txsz)
        bsr  (/ (* (getvar "dimscale") bs) 2)
  )
  (setvar "cmdecho" 0)
  (initget  "Y N")
  (setq lea (getkword "\nLeader Required? Yes or No: <N>  "))
  (if (= lea nil)(setq lea "N"))
  (setq txt "")
  (setq txt (getstring "\nItem Number: <->  "))
  (if (= txt "")(setq txt "-"))
  (if (or (= lea "N")(= lea "n"))
    (progn
      (setq p (getpoint "\Bubble Location (by Bottom Quadrant):  ")
            tp (list (car p) (+ (/ bs 2) (cadr p)))
      )
      (setq osmod (getvar "OSMODE"))
      (setvar "OSMODE" 0)
      (command ".circle" tp "d" bs ".text" "m" tp txsz 0 txt)
      (setvar "OSMODE" osmod)
    )
  )     
  (if (or (= lea "Y")(= lea "y"))
    (progn
      (setq p1 (getpoint "\nLeader Starting Point:  "))
      (setq p2 (getpoint p1 "\nBubble Location:  "))
      (setq ang (angle p1 p2))
      (setq p3 (polar p2 ang bsr))
      (setq osmod (getvar "osmode"))
      (setvar "osmode" 0)
      (command ".line" p1 p2 "" ".circle" p3 "d" bs ".text" "m" p3 txsz 0 txt)
      (setvar "OSMODE" osmod)
    )
  )
  (princ)
)


SEMott

RE: balloons

(OP)
Thanks Farzad Do I copy your file in notepad with  lsp extension to the Autocad2000\support directory.

Thanks for your quick reply.

     jim

RE: balloons

(OP)
Farzad Worked it out I forgot to load the lisp file.

The numbers come out as 0.0000000000 is this correct.

 Thanks again Jim

RE: balloons

Hi guys!
I have been using AutoCad for 12 years but have never (yet) created a Lisp routine.  Would you give me an idiots guide on how to tke your code and make a command available from it?

Best regards
Cameron

RE: balloons

Dear Cameronke,
If you access AutoCAD 2000 anywhere, there is a good document for visual LISP (or AutoLISP) in the Help folder of AutoCAD 2000. The file name is VLISPDEV.PDF .
:)
Farzad

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