Dear,
I need to count the blocks in paper space automatically. Is there any method or lisp for this.
Thanks,
If you have express tools installed , try by typing BCOUNT
Ya i know the bcount command but i need to count blocks on view ports automaticaly (By using lisp or any other). Actually the Bcount command is works on model space but not work on paper space.
So you want to count all the blocks in the current Layout ?
If you have multiple layouts, want to count them also ?
It is not easy if the viewport only shows part of the model space.
For instance,
Is the block half-shown in the viewport included in the count?
Is it an xref in the model space?
Plus:
Nested blocks?
Blocks in array?
Different visiblity in dynamic blocks?
I'd like rely on BCOUNT to count the blocks in the model space.
Here are a selection of block counters which may help:
I'm not so sure that this is what you are looking for, but you can test it.
(defun c:blcount () (setq sset (ssget "X" '((0 . "insert")(-4 . "<not") (410 . "model") (-4 . "not>") ))) (setq sslen (sslength sset)) (alert (strcat "Total number of blocks in paperspace is: " (rtos sslen 2 0))) )
Of course you can add some more filters to selection set, but if I understand what you need is that yours blocks are not in model space, and list 410 is important for that.