How to find a specific block in dwg ?

Status
Not open for further replies.

Branko Kraincanic

Usenet Archive
Joined
Dec 8, 2001
Messages
5
Reaction score
0
Hi all,

I guess some of you have the same problem as I do :
How to find (count) all copies of one block ( like : to count the doors with the same sign) in a drawing ? I am checking a bill of quantities for some bidding and found that would be nice to have such a procedure (lisp routine...) done.

Thanks for suggestions.

Branko Kraincanic
 
Which version of AutoCAD? Do you have Express Tools?
___

"Branko Kraincanic" wrote:

How to find (count) all copies of one block ( like : to count the doors
with the same
sign) in a drawing ? I am checking a bill of quantities for some bidding
and found that
would be nice to have such a procedure (lisp routine...) done.
 
if you use vba then you can port all your info out easily to an excell spreadsheet and then insert the spreadsheet into autocad..i use this to count bolts and such kind of blocks (since im not a big fan of the power pack)

Jaime

"Branko Kraincanic" wrote:

Hi all,

I guess some of you have the same problem as I do :
How to find (count) all copies of one block ( like : to count the doors
with the same
sign) in a drawing ? I am checking a bill of quantities for some bidding
and found that
would be nice to have such a procedure (lisp routine...) done.

Thanks for suggestions.

Branko Kraincanic
 
I just use the SSX command. If I know the block is called ABC, I will enter it as the block name and ssx will tel me how many of them there are in the drawing.
 
Try the Rename command.....

(Branko Kraincanic) wrote:
Hi all,

I guess some of you have the same problem as I do :
How to find (count) all copies of one block ( like : to count the doors with the same sign) in a drawing ? I am checking a bill of quantities for some bidding and found that would be nice to have such a procedure (lisp routine...) done.

Thanks for suggestions.

Branko Kraincanic
...
 
On Fri, 14 Dec 2001 13:56:00 GMT, "no one" wrote:

I just use the SSX command. If I know the block is called ABC, I will enter it as the block name and ssx will tel me how many of them there are in the drawing.

Hi Michael,

I tried the command (ssx) and all I got was this:

Command: (ssx)
Select object/<None>: {selected block named "1" in layer "ZID" }
Filter: ((0 . "INSERT") (2 . "1") (8 . "ZID") (210 0.0 0.0 1.0)) Block name/Color/Entity/Flag/LAyer/LType/Pick/Style/Thickness/Vector:

What means all of this? There is nothing like ssx in Help.
The AutoCAD is R14.

Thanx a lot.
Branko Kraincanic
 
Hi Paul,

On Thu, 13 Dec 2001 16:09:37 -0800, in comp.cad.autocad you wrote:

Which version of AutoCAD?

AutoCAD 14

Do you have Express Tools?

I don't think so.

"Branko Kraincanic" wrote:

>
> How to find (count) all copies of one block ( like : to count the doors with the same
> sign) in a drawing ? I am checking a bill of quantities for some bidding and found that
> would be nice to have such a procedure (lisp routine...) done.

Branko Kraincanic
 
What you got with the (ssx) command is a set of selection criteria. After you run it, you could type SELECT Previous

... and then check your text screen for the number of objects selected. Or, you can get the number directly by typing in an AutoLISP filter such as:

(sslength (ssget "x" '((0 . "INSERT")(8 . "ZID")(2 . "1"))))

In this case the number returned will be the number of insertions of block "1" on layer ZID.

You can create your own block counting command with something like this:

(defun C:BC (/ blk lyr) ;;Block Counter
(setq blk (getstring "\nBlock name to count: ")
lyr (getstring "\n...on which layer? ")
) ;; setq
(if (and (tblsearch "block" blk)(tblsearch "layer" lyr)) (progn (setq count (sslength (ssget "x" (list '(0 . "INSERT") (cons 8 lyr) (cons 2 blk))))) (alert (strcat "There are " (itoa count) " occurrences of block " blk " on Layer " lyr ".")) ) ;; progn (alert "Invalid Block and/or Layer name!") ) ;; if (princ) )
___

You can count the occurrences of any block with
(sslength (ssget
"Branko Kraincanic" wrote:

On Fri, 14 Dec 2001 13:56:00 GMT, "no one" wrote:

>I just use the SSX command. If I know the block is called ABC, I will
enter
>it as the block name and ssx will tel me how many of them there are in
the
>drawing.
>
>--
>Regards,
>Michael John Smyth
>The Drafting Shop
>www.thedraftingshop.com
>
>
>

Hi Michael,
...
 
Even easier Paul:

Command: ssx
Select object <None>:
Current filter: ((0 . "CIRCLE") (8 . "0") (210 0.0 0.0 1.0)) Enter filter option [Block name/Color/Entity/Flag/LAyer/LType/Pick/Style/Thickness/Vector]:
5 found.

Just pick ONE of the objects you want to count, then <Enter>, it reports how many, don't need Select.

cheers
Steve

"Paul Turvill" wrote:

What you got with the (ssx) command is a set of selection criteria. After you run it, you could type SELECT Previous

... and then check your text screen for the number of objects selected.
Or,
 
On this link http://space.tin.it/edicola/lwcon it find blocks to use with autocad.
Free download.
 
Status
Not open for further replies.

Latest threads

Back
Top