How to list the names of all the blocks of a .dwg file in AutoCAD CORE console?

user3336544 picture user3336544 · Aug 10, 2015 · Viewed 8.4k times · Source

i will get custom block in a .dwg file from a list of blocks which I will parse programmatically in Java.

Answer

Maxence picture Maxence · Aug 11, 2015

You can use the command INSERT with the option ?

cd C:\Program Files\Autodesk\AutoCAD 2016
accoreconsole.exe /i "Sample\Database Connectivity\Floor Plan Sample.dwg"
Command: _INSERT
Enter block name or [?]: ?

Enter block(s) to list <*>:

Defined blocks.
  "CHAIR7"
  "COMPUTER"
  "DESK2"
  "DESK3"
  "DOOR"
  "DR-36"
  "DR-69P"
  "DR-72P"
  "FC15X27A"
  "FC42X18D"
  "FNPHONE"
  "IBMAT"
  "KEYBOARD"
  "NCL-HL"
  "RECTANG"
  "RMNUM"
  "SOFA2"

User     Unnamed
Blocks   Blocks
   17        0