How could I check all the blocks in the current drawing?

How could I check all the blocks in the current drawing?

Anonymous
Not applicable
36,729 Views
6 Replies
Message 1 of 7

How could I check all the blocks in the current drawing?

Anonymous
Not applicable

I want to check them all. Are there any list of blocks within current drawing?

0 Likes
Accepted solutions (1)
36,730 Views
6 Replies
Replies (6)
Message 2 of 7

tcorey
Mentor
Mentor
Accepted solution

There are a few ways to get that information:

 

1. Use the Insert command. All blocks in the current drawing will be listed in the pulldown.

2. Use the BEdit (block edit) command. All blocks in the current drawing will be listed in the selection box.

3. View the blocks collection of the open drawing using DesignCenter. Use ADCENTER or DC command.



Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Platinum Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 3 of 7

tcorey
Mentor
Mentor

or you can use this bit of LISP code to make a list that can be copied from the AutoCAD text window.

 

(defun c:go (/ bl blname)
  (setq bl (tblnext "BLOCK" t))
  (while (and bl)
    (setq blname (cdr (assoc 2 bl)))
    (prompt (strcat "\n" blname))
    (setq bl (tblnext "BLOCK"))
    )
  (PRINC)
  )


Tim Corey
MicroCAD Training and Consulting, Inc.
Redding, CA
Autodesk Platinum Reseller

New knowledge is the most valuable commodity on earth. -- Kurt Vonnegut
Message 4 of 7

M!chelle
Advocate
Advocate

How do I run this lisp?

0 Likes
Message 5 of 7

Udo_Huebner
Mentor
Mentor

To run the lisp simply copy the whole source code to the command line and press enter.

Then type GO <Enter>

But without a lisp macro use 

Command: -BLOCK<Enter>?<Enter>*<Enter>

(Don't miss the minus sign at the beginning) and you'll get the same result - a list of blocknames.

 

 

Gruß Udo Hübner (CAD-Huebner)
Message 6 of 7

M!chelle
Advocate
Advocate

Got it, thank you!

0 Likes
Message 7 of 7

thenewton
Community Visitor
Community Visitor

Hi Michell,

another to keep it saved with your cad program is to copy the lisp code in a text editor like notepad,

then from go to File---Save As and then from their name this file "yourfilename.lsp" whatever name you use, put the .lsp at the end.

then go to Autocad command line and type "appload" 

A window will open, here select the saved lsp file and press load and , in Auto-cad command prompt it will show  message "Loaded successful"

Now, go to command line and type the command  go as in the program you can see " its written defun c:go (/ bl blname 

Here in program whatever you will write after the C: as here it is go, you can write any command word which you remember, for example, "blocklistcreator""

It will run the loaded lsp program.