CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
CZ | EN | DE
Login or
  Visitors: 7266

CAD tip CAD tip # 13337:

Question CAD 
 %  platform  category 
Q - question

How to select blocks by attribute values? (SelByAttr)

A - answer Using the freeware LISP utility SelByAttr, you can easily bulk select blocks determined by the existence or value of a particular attribute or by a range of attribute values.

You can download the SelByAttr app from Download, load it into your AutoCAD using APPLOAD and launch by typing the command SELBYATTR (or -SELBYATTR as the commandline version, or (C:SELBYATTR) directly on the Select objects prompt).

In the dialog box or in successive prompts, specify the name, list (enumeration), or mask of the block names (e.g. Door*,Sliding*), the name, list, or mask of the layers in which the blocks are inserted, the name, list, or mask of the attribute names/tags (e.g., Width), and then the attribute values, if any. You can also pick the names from the drawing with the "Pick" button - by selecting a sample block, resp. attribute.

The searched attribute values can either be entered as text (again, a specific value, enumeration, or mask) or as a number or range of numeric values. This can be specified either by a range from-to or by specifying a value and a tolerance (allowable deviation from this value).

Using the Recalc button, you can view the number of blocks to be selected, a preview of the list of selected blocks and their attribute values. You need to specify at least one search parameter - e.g. "*" as the block name.

The application also supports dynamic blocks. See also the related SelDB application for selecting blocks according to dyn.block parameters.

100% *  CAD 
21.5.2022    4726×  

See also:
Tip 13868:XrefStamp - create a dynamic list of xrefs in your DWG drawing.
Tip 13855:DBXscanLayers and DBXscanBlocks - bulk report content of DWG files in a folder.
Tip 13831:ReplMTcol - recoloring parts of text in paragraph Mtext.
Tip 13784:Export block coordinates to a table. How to use the DATAEXTRACTION command in AutoCAD LT?
Tip 13769:Connect points by a list of point numbers - PoNum.

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 glossary   

Increase your productivity with our set of add-on functions for AutoCAD Civil 3D
CADstudio Civil Tools More info

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