0 Members and 1 Guest are viewing this topic.
Will,FYIThat will fail if there are no such block in the drawing.
This is what I was going to use and just pass it the name of my block so that I could use it in other places.Code: [Select](defun c:bcount (str) (rtos (sslength (ssget "x" (list '(0 . "INSERT") (cons 2 str)))) 2 0 ))
(defun c:bcount (str) (rtos (sslength (ssget "x" (list '(0 . "INSERT") (cons 2 str)))) 2 0 ))
(setq str (getstring "Block name : "))(if str (progn(setq str1 (ssget "X" (list (cons 0 "INSERT") (cons 2 str))))(alert (strcat "You have " (rtos (sslength str1)) " of " str ))))
You can't input that in a block.
I have never written a reactor so I would have to look into that.Will a reactor keep the count seperate if the block is inserted multiple times in a dwg?
How are you going to put your routine in a block so that it updates as the block updates?I would like to know how because I have yet to see it done.