Extracting attribute information

The ATTEXT command copies data from attributes to a text file via a dialog box.

The -ATTEXT command copies data from attributes to a text file via the Command line.

The text file can be imported in a database or a spreadsheet.

You can save the file in any of the following formats:

  • Comma Delimited Format (CDF): Contains one line for each instance of a block, with individual attribute fields separated by commas. Character string fields are enclosed with single quotation marks. You must specify a template file when extracting to a CDF file.
  • Space Delimited Format (SDF): Contains one line for each instance of a block. Each attribute field has a fixed length; there are no separators or character string delimiters. You must specify a template file when extracting to a SDF file.
  • Drawing Exchange Format (DXF): Creates a subset of a standard DXF file (a *.dxx file) containing all the information about each block, including the insertion points, rotation angles, and attribute values. No template file is required.

Before extracting attributes to a CDF or SDF file, you must create a template file. The template file is an ASCII text file that specifies the attribute data fields to be written in the extract file. Each line of the template file specifies one attribute field. BricsCAD recognizes 15 different fields, which contain elements such as the block name, the X, Y, and Z coordinates of its insertion point, the layer on which it is inserted, etc. You can include any of these fields. The template file must include at least one attribute name.

Each line in the template file must start with the field name. Block name and insertion-point values must begin with BL:. The next nonblank character must be either a C (indicating a character string field) or an N (indicating a numeric field). This character is then followed by three digits indicating the width of the field (in characters). The final three digits indicate the number of decimal places (for numeric fields). In the case of character fields, the last three digits must be zeros (000). A typical template file is similar to the one shown here:



A. Field name

B. Field format

1. Block name (must be preceded by BL: )

2. Coordinate fields (must be preceded by BL: )

3. Attribute tags

4. Indicates the field data type: C for character fields, N for numeric fields

5. Field width (number of characters)

6. Number of decimal places for numeric fields, 000 for character fields

To extract attribute information

  1. Do one of the following:
    • Click the Extract Attributes tool button on the Tools toolbar.
    • Choose Extract Attributes in the Tools menu.
    • Launch the ATTEXT command.

    The Extract Attributes dialog box appears.

  2. Click the Select button.

    The Extract Attributes dialog box closes temporarily.

  3. Select the blocks, then press Enter or right click.

    The Extract Attributes dialog box reopens.

  4. Select the text file format: DXF (drawing exchange format), CDF (comma delimited format) or SDF (space delimited format).
  5. Select the Template file.
  6. Specify the Output file name.
  7. Click the Extract button.

    You are prompted: <number> records extracted.