Editing and extracting block attributes: ATTEDIT, BATTMAN, ATTSYNC and EATTEXT
You have forty doors, each with a number, a type and a width, or a hundred luminaires with a reference, and suddenly the numbering rule changes. Or you need the full list for the bill of quantities. Doing it block by block is a waste of time: block attributes can be edited in bulk, redefined and exported. This guide covers the AutoCAD commands that do it and how they work in LinceCAD, where they behave the same way.
1. Change the values of one block
An attribute is a variable text inside a block (for example NUMBER, TYPE and WIDTH in a door block). To change
the values of one block you have three options:
ATTEDIT(aliasATE): select the block and, for each attribute, type the new value or press Enter to keep the current one. In LinceCAD, double-clicking the block also starts it.EATTEDIT: opens a window with one row per attribute; change what you need and click OK. It can be undone withUNDO.ATTIPEDIT(aliasATI): click the attribute text and type the new value. AutoCAD edits on top of the text itself; LinceCAD asks on the command line.
These commands only change the value. The attribute's position, height and modes stay as they were.
2. Change many blocks at once with -ATTEDIT
-ATTEDIT is the command-line version and the one for batch work. It first asks
whether you want to edit attributes one at a time:
- Enter
-ATTEDITand answer No to "Edit attributes one at a time?" for global editing. - Choose whether to change only the attributes visible on screen (you select them) or all in the drawing.
- Give the filter: block name, tag and value. Wildcards (
*,?,#,@,~) and several entries separated by commas are accepted; Enter leaves*. The specification\picks empty attributes. - Enter the string to change and the new one. It is replaced in every value that contains it.
For example, to turn P-01 into DR-01 in every door, filter on the block DOOR and the tag NUMBER, and change
the string P- to DR-. In one-at-a-time mode (Yes) you can also change, attribute by attribute, the value,
position, height, angle, style, layer and color.
3. Redefine an attribute and sync blocks already inserted
Changing a block definition (adding a WIDTH attribute, moving the text, changing the default value) does not
update the inserts already in the drawing: they keep their old attributes. They have to be synchronized.
- Open the block with
BEDITand add or change the attribute withATTDEF, for exampleWIDTHwith a default value of 80. Close saving. - Enter
ATTSYNCand select an insert of the block, or type its name. - The inserts, in model space and in layouts, are rebuilt from the definition. LinceCAD reports how many were updated.
Values are kept by tag: a new attribute takes the default value and one no longer in the definition disappears.
If you rename a tag (NUM to NUMBER), ATTSYNC sees a new attribute and its value is lost; change tags before
filling in values, or go back with U.
To change the order, the prompt, the default value and the modes (invisible, constant, verify, preset) use
BATTMAN, the Block Attribute Manager. Its Synchronize button applies the changes
to every insert without closing the dialog, just like ATTSYNC. The tag cannot be changed there.
4. Show or hide attributes
ATTDISP works on the whole drawing and changes the ATTMODE variable:
- Normal: each attribute is shown according to its Invisible mode.
- ON: all are shown, invisible ones too. Handy for checking.
- OFF: none is shown. Handy for plotting a clean sheet.
5. Extract attributes to a table or CSV
For the door schedule, the luminaire list or a title block table:
ATTEXT: select the blocks (or press Enter for all those in model space) and choose Table (it asks for the upper-left corner) or File (a.csvpath). The output has a column for the block name, one for each insertion coordinate (X and Y) and one per tag.EATTEXT: opens a dialog where you tick the blocks and attributes you want and choose a table or a CSV. In AutoCAD it is a multi-page wizard with filters and a.dxeextraction file; in LinceCAD it is a single dialog and covers attributes only.DATAEXTRACTION: to output other objects as well (count, layer, length and area).
The CSV is written with a UTF-8 mark, so the spreadsheet reads accented characters correctly.
Summary: which command for what
| I want to… | Command |
|---|---|
| Change the values of one block | ATTEDIT, EATTEDIT, ATTIPEDIT |
| Change a value in many blocks | -ATTEDIT (global editing) |
| Change prompt, order, default value or modes | BATTMAN |
| Add an attribute to the definition | ATTDEF (inside BEDIT) |
| Update the blocks already inserted | ATTSYNC |
| Show or hide attributes | ATTDISP |
| Schedule to a table or CSV | ATTEXT, EATTEXT |
| Schedule including other objects | DATAEXTRACTION |
If you are weighing a switch from AutoCAD, the AutoCAD-compatible CAD checklist shows what else behaves the same.
Related manual pages: -BEDIT · RESETBLOCK · CLASSICINSERT · -INSERT.
Frequently asked questions
What is the difference between ATTEDIT and EATTEDIT?
Both change the values of one block, but ATTEDIT asks for them one by one on the command line and EATTEDIT shows them in a window, one row per attribute. Neither changes the block definition: that is what BATTMAN is for.
How do I change the same value in many blocks at once?
Use -ATTEDIT, the command-line version: answer No to "Edit attributes one at a time?", filter by block name, tag or value with wildcards (*, ?) and enter the string to change and the new one.
I added an attribute to the block definition but the inserted blocks do not show it. Why?
Because existing inserts do not update by themselves. Run ATTSYNC (or the Synchronize button in BATTMAN): the inserts are rebuilt from the definition and keep their values, matched by tag.
How do I export attributes to Excel?
With ATTEXT or EATTEXT choose a CSV file, which opens in any spreadsheet, or a table in the drawing itself. Each block is a row and each tag is a column.
Try LinceCAD for 30 days with your own blocks and attributes. Download · See pricing · ATTEDIT in the manual.