Skip to content

← Blog

Editing and extracting block attributes: ATTEDIT, BATTMAN, ATTSYNC and EATTEXT

· Guides

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:

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:

  1. Enter -ATTEDIT and answer No to "Edit attributes one at a time?" for global editing.
  2. Choose whether to change only the attributes visible on screen (you select them) or all in the drawing.
  3. Give the filter: block name, tag and value. Wildcards (*, ?, #, @, ~) and several entries separated by commas are accepted; Enter leaves *. The specification \ picks empty attributes.
  4. 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.

  1. Open the block with BEDIT and add or change the attribute with ATTDEF, for example WIDTH with a default value of 80. Close saving.
  2. Enter ATTSYNC and select an insert of the block, or type its name.
  3. 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:

5. Extract attributes to a table or CSV

For the door schedule, the luminaire list or a title block table:

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 blockATTEDIT, EATTEDIT, ATTIPEDIT
Change a value in many blocks-ATTEDIT (global editing)
Change prompt, order, default value or modesBATTMAN
Add an attribute to the definitionATTDEF (inside BEDIT)
Update the blocks already insertedATTSYNC
Show or hide attributesATTDISP
Schedule to a table or CSVATTEXT, EATTEXT
Schedule including other objectsDATAEXTRACTION

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.