bcount autolisp

bcount autolisp

Anonymous
Not applicable
2,240 Views
3 Replies
Message 1 of 4

bcount autolisp

Anonymous
Not applicable

HI THERE,

 

I am trying to count the # of all blocks in my drawing. Normally bcount works in my autocad but it is not working in autolisp. Am i doing something wrong below

 

(defun c:COUNTLO()

;(ssget "_X" '((0 . "INSERT")(2 . "Block_Name")))
(SETQ SSLO '(ssget "_X" '((0 . "INSERT"))))

(COMMAND "BCOUNT" "SSLO" "")


)

0 Likes
Accepted solutions (2)
2,241 Views
3 Replies
Replies (3)
Message 2 of 4

dlanorh
Advisor
Advisor
Accepted solution

@Anonymous wrote:

HI THERE,

 

I am trying to count the # of all blocks in my drawing. Normally bcount works in my autocad but it is not working in autolisp. Am i doing something wrong below

 

 

(defun c:COUNTLO()

;(ssget "_X" '((0 . "INSERT")(2 . "Block_Name")))
(SETQ SSLO '(ssget "_X" '((0 . "INSERT"))))

(COMMAND "BCOUNT" "SSLO" "")


)
Try the lisp HERE

I am not one of the robots you're looking for

0 Likes
Message 3 of 4

Anonymous
Not applicable

that code require a user prompt. i am looking for something that select all blocks in a drawing or set of drawings then apply something similar to bcount on them. such that every block show its name then the count for all blocks. 

0 Likes
Message 4 of 4

Anonymous
Not applicable
Accepted solution
0 Likes