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 the 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
- Do one of the following:
- Click the Extract Attributes tool button on the Tools toolbar.
- Choose Extract Attributes in the tools menu.
- Type attext in the command bar, then press Enter.
The Extract Attributes dialog opens.
- Click the Select button.
The Extract Attributes dialog closes temporarily.
- Select the blocks, then press Enter or right click.
The Extract Attributes dialog reopens.
- Select the text file format: DXF (drawing exchange format), CDF (comma delimited format) or SDF (space delimited format).
- Select the Template file .
- Specify the Output file name.
- Click the Extract button.
You are prompted: <number> records extracted.