Extract attributes into a text file
Home tab > Symbol group > Attributes menu > Extract attribute information, ATTEXTRACT
Read attribute information from objects and save them into a text file. Using template file user can define information to be extracted to a result file.
Result file can be imported to common database or spreadsheet programs for example Microsoft Excel.
Do the following:
-
Enter template file name.
Full file path shall be entered (for example C:\Own\CADMATIC\attextract_templatefile.txt).
Entering '-character a file dialog is shown to help selecting template file. -
Enter result file name.
Full file path shall be entered (for example C:\Own\CADMATIC\attextract_result.txt). -
Select CDF or SDF as a result file format.
CDF: Fields are separated by a comma. Text fields are quoted. Each element is followed by an automatic line feed.
SDF: Unformatted, template file shall contain all format information
Want to try?
Copy following template file example to a text file. Save it to disk and try this command how it works.

This template file does not contain any format information so CDF is correct result file format in this case
[CIRCLE]
:X0
:Y0
:RADIUS
:AREA
:PERIMETER

This template file contains all necessary format information so SDF is correct result file format in this case
Fields are separated by a comma (,) so that spreadsheet programs (e.g. Excel) can separate fields correctly to own columns. Typically this kind of separator is either comma, semicolon, space or tabulation (\t).
[LINE]
:X0 "%.2r,"
:Y0 "%.2r,"
:X1 "%.2r,"
:Y1 "%.2r,"
:LAYER "%s\n"

This template file contains also all necessary format information so SDF is correct result file format in this case
Formatting is done so that end result works best when viewed with ordinary text editor.
[SYMBOL]
:NAME "Symbol name is %s\n"
:ANGLE "Symbol angle is %.2r degrees\n "
:LAYER "and layer %s\n"
PRICE "Attribute PRICE on %i\n"
QUALITY "Attribute QUALITY is %s\n"
Template file
Based on template file information is extracted to external text file. Template file is textual file that defines what elements and how information is extracted.
Depending on element type following information can be extracted:

Property | Explanation |
---|---|
NAME |
Symbol name |
X0 | Insertion point X coordinate |
Y0 | Insertion point Y coordinate |
LAYER | Layer |
ANGLE | Symbol angle |
XSCALE | X scale |
YSCALE | Y scale |
ROWS | Rows |
COLUMNS | Columns |
ROWSPACING |
Row spacing |
COLUMNSPACING |
Column spacing |
ATTRIBUTE NAME |
Attribute value |

Property | Explanation |
---|---|
X0 | Start point X coordinate |
Y0 | Start point Y coordinate |
X1 | End point X coordinate |
Y1 | End point Y coordinate |
LAYER |
Layer |
COLOR |
Line color |
ANGLE |
Line angle |
LENGTH |
Line length |

Property | Explanation |
---|---|
X0 | Mid point X coordinate |
Y0 | Mid point Y coordinate |
LAYER | Layer |
COLOR | Arc color |
STARTANGLE | Arc start angle |
ENDANGLE | Arc end angle |
LENGTH | Arc length |
RADIUS | Arc radius |

Property | Explanation |
---|---|
X0 | Mid point X coordinate |
Y0 | Mid point Y coordinate |
LAYER | Layer |
COLOR | Circle color |
RADIUS | Circle radius |
AREA | Circle area |
CIRCUMFERENCE | Circumference |

Property | Explanation |
---|---|
X0 | Mid point X coordinate |
Y0 | Mid point Y coordinate |
X1 |
Major axis X coordinate |
Y1 |
Major axis Y coordinate |
LAYER | Layer |
COLOR | Ellipse color |
STARTANGLE | Ellipse start angle |
ENDANGLE | Ellipse end angle |
LENGTH | Ellipse length |
RADIUS |
Ellipse radius |
AREA |
Ellipse area |

Property | Explanation |
---|---|
X0 | 1st point X coordinate |
Y0 | 1st point Y coordinate |
X1 |
2nd point X coordinate |
Y1 |
2nd point Y coordinate |
X2 |
3rd point X coordinate |
Y2 |
3rd point Y coordinate |
X3 |
4th point X coordinate |
Y3 |
4th point Y coordinate |
LAYER | Layer |
COLOR | Fill color |
Result file detailed structure (not mandatory)
Each element can have separate format definition how information is extracted to file. Format definition shall be done if static text is needed alongside element information. Quoted format definition can contain statical text but also line feed (defined by \n) or tabulation (defined by \t).
In case that more detailed formatting is needed it shall be defined as follows:
"% + .decimals + field type"
Field type can be either i, r or s (where i=integer number, r=decimal number, s=text)
For example:
"%.1r\t" (decimal number is always shown with 1 decimal, followed by tabulation)
"Symbol name is: %s\n" (text will be for example "Symbol name is: MODEL" followed by line feed)
Template file examples

110.00, 147.1267, "LAYER1",
250.00, 267.3, "LAYER1",
340.00, 421.551, "LAYER2",
Template file row |
Explanation |
---|---|
[LINE] | Extract information on lines in drawing |
:X0 "%.2r" | Line start point X coordinate. For decimal number (r-character) two decimals is always shown. |
:Y0 | Line end point Y coordinate. Because no formatting is available all information (all decimals) is shown as it is. |
:LAYER | Layer name. |

Symbol name is SYMB1
Symbol angle is 0.00 degrees and layer 0
Attribute PRICE is 7
Symbol name is SYMB2
Symbol angle is 45.00 degrees and layer OWN
Attribute PRICE is 9
Template file row |
Explanation |
---|---|
[SYMBOL] |
Extract information on symbols in drawing |
:NAME "Symbol name is %s\n" |
Symbol name, s-character means text. Before symbol name text "Symbol name is" will be added. Line feed (\n character). |
:ANGLE "Symbol angle is %.2r degrees " |
Symbol angle. r-character means a decimal number and .2 means that number is shown with 2 decimals. Text line will be "Symbol angle is" followed by angle value and text "degrees". |
:LAYER "and layer %s\n" |
Symbol layer name (s-character) as text. Text line will be "and layer" followed by layer name. Line feed (\n character). |
PRICE "Attribute PRICE is %s\n" |
Symbol attribute PRICE name as text (s-character). Text line will be "Attribute PRICE is" followed by attribute value. Line feed (\n character). |