Over 1.092.000 registered users (EN+CZ).
AutoCAD tips, Inventor tips, Revit tips.
Try the new precise Engineering calculator.
New AutoCAD 2026 commands and variables.
CAD tip # 7082:
Question
A
In order to quickly select block references from a DWG drawing and first of all to perform block selections from AutoCAD script files, you may need a useful tool for selection of blocks by their name.
This function can be performed in two simple ways. E.g. if you need to erase (delete) all blocks named "MYBLOCK" from your drawing, use one of the following methods (menu-macro format used for readability, for scripts replace the semicolons by spaces):
- _ERASE;(ssget "_X" '((0 . "INSERT")(2 . "MYBLOCK")))
- SSX;;B;MYBLOCK;;_ERASE;_P;;
None of these methods can be used in AutoCAD LT.
ACAD


27.11.2009
21770×
applies to: AutoCAD ·