Originally Posted by
jmarck
I am a landscape architect and we typically do call-outs for all of our plant symbols on a drawing. Basically I have many clusters of different plant symbols, which are blocks, and I want to label them. Is there a lisp that would do a bcount and then create a leader with the count shown for example:
(10) AS
(4) RE
(6) TR
Thanks
Welcome to the forums!
This is all I have for the moment, but I'll try to get you one that can do all of them in one shot shortly.
Hope this helps:
Code:
(defun c:TEST ( / oldCmd eName1 blkName cnt ss label)
(setq oldCmd (getvar 'cmdecho))
(setvar 'cmdecho 0)
(prompt "\n >> Select First Block, Then Multiple, <Enter> to Exit: ")
(while
(/= nil (setq eName1 (car (entsel))))
(progn
(redraw eName1 3)
(setq blkName (cdr (assoc 2 (entget eName1))))
(setq cnt
(rtos
(sslength
(ssadd eName1
(setq ss (ssget (list '(0 . "INSERT") (cons 2 blkName))))))
2
0))
(redraw eName1 4)
(setq label (strcat "(" cnt ") " blkName))
(command "._leader" pause pause "f" "n" "" label "")
(prompt (strcat "\n >> Block Count >> " label))))
(setvar 'cmdecho oldCmd)
(princ)) ;_end defun
Cheers!