CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products [www.cadforum.cz] ARKANCE | CONTACT - CZ | SK | EN | DE
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.
Plex.Earth connects AutoCAD and Google Earth

CAD tip CAD tip # 7082:

Question

CAD 
 %  platform  category 
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;;
The first method uses the LISP object selection function. The second method uses the command SSX from Express Tools.

None of these methods can be used in AutoCAD LT.

ACAD
100% *CAD
27.11.2009    21770×  
applies to: AutoCAD ·

See also:
Tip 14526:How to export geometry from AutoCAD DWGs to JSON files and import it back?
Tip 14446:Undocumented options in AutoCAD FIELDs - hyperlinks, hexadecimal or binary format
Tip 14039:How to display the total volume or surface of 3D solids in DWG?
Tip 13938:ModDXF - utility for bulk modification/display of internal DXF properties in DWG entities.
Tip 13878:SelectSimilar - extended selections for AutoCAD, incl. LT and Web versions


Back    All CAD Tips



Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD: 
OS: 
Categ: 
Text:
 FAQ
  



Featuring:
Save your floating licenses (NLS) consumed by inactive users - free unused licenses with
LogOff 2006 More info


Please use these tips at your own risk.
ARKANCE is not responsible for possible problems that may occur as a result of using any of these tips.
TOPlist