Commands

ATTOUT command in AutoCAD : Exports block attribute values to an external file in tab-delimited ASCII format

If you need a clear, step-by-step guide to use the AutoCAD ATTOUT command to export block attribute values, this article covers what the command does, how to run it, common errors and fixes, alternative methods, practical tips, and a helpful FAQ.


What is the ATTOUT command?

The ATTOUT command in AutoCAD exports block attribute values to an external file in tab-delimited ASCII format (usually a .txt file). It extracts the attribute tags and their current values from block references in your drawing so you can open and edit them in spreadsheet programs (Excel, Google Sheets) or process them with other tools.

Common uses:

  • Creating a spreadsheet of part numbers, descriptions, quantities, or other metadata stored as block attributes.
  • Preparing data for BIM, inventory, or schedule workflows.
  • Editing attribute values in bulk outside AutoCAD then reimporting or updating the drawing.

How to use ATTOUT (Step by step)

Quick shortcut

  • Type ATTOUT in the command line and press Enter.

Detailed steps

  1. Open the drawing that contains the blocks with attributes.
  2. At the command prompt, type ATTOUT and press Enter.
  3. When prompted, enter a file name and location for the exported file (for example: C:\Temp\attributes.txt). The file will be tab-delimited ASCII.
  4. You will be prompted to choose which attributes/blocks to export. Typical options include selecting specific objects, exporting All, or entering a block name (options may vary by AutoCAD version).
    • If selecting objects, use the cursor to select the block references in the drawing window and press Enter.
    • If choosing All, the command will scan the entire drawing for blocks with attributes.
  5. After selection, AutoCAD writes the file. Open it in a text editor or import it into a spreadsheet program using the tab delimiter.
  6. In Excel, use Data > From Text/CSV (or open the .txt file) and ensure Tab is selected as the delimiter to see columns for block name, attribute tag, attribute value, position, etc. (column content depends on AutoCAD version and export settings).

Example — before and after

  • Before: A block named “MOTOR” has attributes: TAG: PN, VAL: MTR-123, TAG: REV, VAL: A.
  • After running ATTOUT, the resulting tab-delimited file may contain lines like:
    MOTORPNMTR-123
    MOTORREVA
    (Replace with an actual tab character in the file.)

Common reasons ATTOUT doesn’t work and how to fix them

  • No attributes present in blocks

    • Cause: Blocks are simple geometry or attribute definitions were never created.
    • Fix: Use the BATTMAN (Block Attribute Manager) or edit the block definition to add attributes.
  • Attributes are invisible or on off/locked layers

    • Cause: Attributes are set to invisible, or their layer is off or frozen.
    • Fix: Turn on the layer or temporarily set attributes visible. ATTOUT typically reads attribute values even if invisible, but visibility/layer issues can affect selection.
  • Selecting the wrong objects

    • Cause: You selected the block definition instead of block references, or missed references when using object selection.
    • Fix: Ensure you select block references in model/layout space. Use the All option if you want every instance.
  • File write or permission errors

    • Cause: The target folder is protected or not available (network path, no write permission).
    • Fix: Choose a local folder where you have write rights (e.g., C:\Temp), or run AutoCAD with appropriate permissions.
  • Command not recognized

    • Cause: Some AutoCAD installs may not include older Express Tools commands or a different AutoCAD flavor.
    • Fix: Use alternatives such as DATAEXTRACTION or EATTEXT (see alternatives below) or install Express Tools if needed.
  • Exported file appears empty or incomplete

    • Cause: Attribute values may be default or constant; the selection set might have been empty.
    • Fix: Verify attributes actually have non-empty values. Use a selection filter to confirm block references are selected.
  • Locale/Delimiter issues when opening in Excel

    • Cause: Regional settings use different decimal or list separators.
    • Fix: When importing the .txt file into Excel, explicitly set the delimiter to Tab. If you need CSV, convert tabs to commas or use a Data Extraction to produce CSV.

Alternative methods to export attributes

  • DATAEXTRACTION

    • Built-in wizard that can export attribute data to an Excel (.xlsx) or CSV file and create a table inside the drawing. Pros: more control, fields selection, filtering, and formatting.
  • EATTEXT

    • Another attribute export command (may be available depending on your AutoCAD version). It creates a text file of attribute values. Check your version for availability.
  • Data Link / Table

    • Use Data Extraction to link attributes to a table and then export or copy/paste the table into Excel.
  • AutoLISP or scripts

    • Custom scripts can collect attributes and write to any format you need (CSV, JSON, XML). Good for automated or repeated workflows.
  • Manual copy or property palette

    • For very small numbers of attributes, use the Properties palette or edit block attributes manually.

Tips and best practices

  • Always make a backup of your drawing before batch exporting and re-importing edited values.
  • Use consistent attribute tags across block definitions to make extraction and processing easier.
  • Prefer DATAEXTRACTION when you need more control or want direct Excel output.
  • When opening the exported .txt in Excel, ensure Tab is selected as the delimiter to split columns correctly.
  • If ATTOUT is not recognized, check whether your AutoCAD installation includes the necessary Express Tools or try the DATAEXTRACTION command.
  • Use a dedicated folder like C:\Temp for exports to avoid permission issues on network drives.
  • If you plan to re-import edited values, keep a column with the block’s handle or unique ID (if available) to match records accurately.

FAQ

What file format does ATTOUT create?

ATTOUT writes a tab-delimited ASCII file (commonly saved as .txt). You can open it in text editors or import into spreadsheet programs using Tab as the delimiter.

Can I export attributes directly to Excel?

Not directly with ATTOUT — it creates a tab-delimited .txt file which Excel can open or import. To get a native Excel file (.xlsx), use the DATAEXTRACTION wizard.

ATTOUT is not recognized — what should I do?

If the command is unavailable, try DATAEXTRACTION or EATTEXT. Some older commands are part of Express Tools; install Express Tools or use AutoLISP scripts as an alternative.

How do I export only selected blocks?

When prompted by ATTOUT, use the object selection option: select the block references you want to export, then press Enter. If the command offers an All option, choosing it will export every block attribute in the drawing.

Will ATTOUT export attribute tags and values?

Yes — the export typically includes the block name, attribute tag, and the attribute value. The exact columns may vary by AutoCAD version.

Can I edit the exported file and re-import updated attribute values?

Yes — you can edit the exported file (e.g., in Excel) and then use tools or scripts (such as ATTIN/custom scripts or Data Link workflows) to update attribute values in the drawing. Always test on a copy first.

Does ATTOUT work with attributes inside dynamic blocks?

It depends on how the dynamic block stores attributes. In many cases, attributes inside dynamic block references will export, but if the attribute is inside the block definition in a nonstandard way, results may vary. Test on a sample block.

The exported data is missing fields — why?

Possible causes: selection errors, attributes with empty values, layer visibility issues, or version differences. Verify your selection set, ensure attributes contain values, and try DATAEXTRACTION for more robust results.