thanks David.
I modified my thought process a little and changed it to make my LISP work
It trims the leader line for item number bubbles.
Input ->
- select you item number bubble block (you will need to modify the LISP file to suit you block name)
What it does ->
- draws a circle at the insertion point of the block. Circle size is based upon the scale of the block selected. (you may need to modify the circle command line to suit your radius of your bubbles)
- calls the trim command to trim the line that must have an endpoint at the center of the bubble circle.
- erases the circle
This is a quick way to trim those lines to make to item number bubble look nice.
Hope you find it useful.
Code:
;Trim the leader line for bubbles
;Kevin Petursson February 22, 2006
(defun c:bt (/ what where scale blockname tryagain insertpoint whatlength)
;allow three attampts to select the correct block
(setq tryagain 3)
(while (< 0 tryagain)
(setq what nil)
(print "Select Item Number Bubble...")
;(setq what (ssget ":s"))
(setq what (ssget))
;get name of the block
(setq whatlength (sslength what))
(setq whatlength (1- whatlength))
(while (<= 0 whatlength)
(setq blockname "no")
(setq blockname (cdr(assoc 2 (entget(ssname what whatlength)))))
;get scale of the block
(setq scale (cdr(assoc 41 (entget(ssname what whatlength)))))
;get the insertion point of the block
(setq insertpoint (cdr(assoc 10 (entget(ssname what whatlength)))))
;check to make sure we have the right block "TABL213A"
(if (= blockname "TABL213A")
(progn
(princ "That was a Item Number Bubble...working...")
(setq tryagain 0)
(command "circle" insertpoint (* 0.125 scale))
(command "trim" "l" "" insertpoint "")
(command "erase" "l" "")
)
(progn
(princ "That was not a Item Number Bubble... ")(princ tryagain)(princ " more tries...")
(setq tryagain (1- tryagain))
)
)
(setq whatlength (1- whatlength))
)
)
;(redraw (ssname what 0) 3)
;(setq where (getpoint "Select point..."))
;(command "break" what where "@0,0")
;(princ "all done")
;(princ)
)
Bookmarks