klew31 发表于 2022-7-6 14:44:48

Item Balloon - Leader

Hello everyone, first time poster.I'm not a drafter but I do know how to use AutoCAD fairly well.We have AutoCAD 2004 here.
 
I'm trying to come up with a LISP routine for an item balloon with two lines of text that is centre justified inside the balloon.The balloon should connect to the item I'm marking with a line that does not have an arrow head on the end.
 
I have been able to do this with a single line of text, but I cannot seem to get it to work with two lines.What it does is it will print the two text entries on top of each other.
 
Can anyone help me out?
 
Cheers.

Tankman 发表于 2022-7-6 14:52:02

 
Try this lisp routine, might work for you. Or at least, a starting point.
I believe B3B has also been added to the routine, try it.
Callout.lsp

Tiger 发表于 2022-7-6 14:53:58

Check this thread out, there are a few versions of a lisp in there that Lee Mac was kind enough to do for me - might be something you can work with.

Tankman 发表于 2022-7-6 14:58:11

 
Lee Mac is the pro, great lisps. He must live lisp routines!

Lee Mac 发表于 2022-7-6 15:02:51

 
 
Many thanks Tankman

Lee Mac 发表于 2022-7-6 15:06:23

Sorry guys, just found a typo in the latest version of the LISP posted in the thread that Tiger refers to
 
Sorry guys

klew31 发表于 2022-7-6 15:09:31

Hey Guys, I've tried out all the lisp routines suggest here but no luck.There was a couple that were close.I believe the closest one was in callout called T1B.But, it only prints fonts in the lower section of the circle below the cross line.

Lee Mac 发表于 2022-7-6 15:16:21

 
Did mine not perform as you wanted?

flowerrobot 发表于 2022-7-6 15:16:52

This one i did not make my self. It works with out error, but it is not poished at all
I personally dont like it,
I use a dynamic block, with a few routines. I find its much nicer having it all blocked
 
 

(defun C:it(/ th pt1 pt2 linang arrpt2 txt bubrad )(initerr)   (SETQ LA (GETVAR "OSMODE"))   (SETQ LT (GETVAR "CELTYPE")) (command "OSMODE" 512) (command ".layer" "m" "dim" "c" "4" "dim" "L" "CONTINUOUS" "dim" \) (graphscr) (setq pt1 (getpoint "\nSelect tip of Arrow : ")) (command "osmode" 0) (setq pt2 (getpoint "\nSelect Centrepoint of Bubble: " pt1)) (setq th (* (GETVAR "DIMTXT")(getvar "dimscale"))) (setq txt (getstring "\nEnter Text : ")) (setq factor (/ 45 35.000000000000)) (setq bubrad (* factor th)) (command "circle" pt2 bubrad) (command "change" "L" "" "P" "C" 4 "") (setq linang (angle pt1 pt2)) (setq arrpt2 (polar pt2 linang (* -1 bubrad)))      (COMMAND "LEADER" pt1 arrpt2 "" "" "N") (command "text" "m" pt2 th "0" txt) (command "change" "L" "" "P" "C" 2 "")    (SETVAR "OSMODE" LA)   (SETVAR "CELTYPE" LT)(princ));;;*===========================================================(defun initerr () (setq oldlayer (getvar "clayer")) (setq oldsnap (getvar "osmode")) (setq oldpick (getvar "pickbox")) (setq temperr *error*) (setq *error* trap) (command "dimsah" "off") (command "dimse2" "off") (command "dimblk2" "") (princ))   ;defun;;;*===========================================================(defun trap (errmsg) (command nil nil nil) (if (not (member errmsg '("console break" "Function Cancelled"))   )   (princ (strcat "\nError: " errmsg)) )   ;                  (setvar "clayer" oldlayer) (setvar "blipmode" 0) (setvar "menuecho" 0) (setvar "highlight" 1) (setvar "osmode" oldsnap) (setvar "pickbox" oldpick) (command "dimsah" "off") (command "dimse2" "off") (command "dimblk2" "") (princ "\nError Resetting Enviroment ") (terpri) (setq *error* temperr) (princ))   ;defun;;;*===========================================================(defun reset () (setq *error* temperr) (setvar "clayer" oldlayer) (setvar "blipmode" 0) (setvar "menuecho" 0) (setvar "highlight" 1) (setvar "osmode" oldsnap) (setvar "pickbox" oldpick) (princ))   ;defun;;;*===========================================================

Tankman 发表于 2022-7-6 15:22:07

 
I've heard it said a few times, "Lee Mac is hard to understand, he speaks with a lisp!"
页: [1] 2
查看完整版本: Item Balloon - Leader