AutoAttr.ini - Automatic Compilation of Attributes
The AUTOATTR.INI file can be edited with any text editor.
This file contains the information for the automatic management of part attributes.
Let's look at the following example:
[code]
;definition of macros used in the [newpart] and [changeattr] sections
;Gets the value of the modified attribute (use only in [changeattr])
value=prif tag getattr
;Gets the name of the part
partname=prif "$name" getattr
;Gets the value of the DISEGNATORE attribute of the parent part
partdis_padre=prif ppdr "disegnatore" getattr
[newpart]
;Setting attributes when creating a part
;Sets the 'descrizione' attribute equal to the part name
1=prif "descrizione" partname setattr
;Sets the 'data' attribute with the dd/mm/yy format
2=prif "DATA" "%d/%m/%y" time setattr
;Sets the 'disegnatore' attribute equal to that of the parent part
3=prif "disegnatore" partdis_padre setattr
;Examples
;Sets the 'disegnatore' attribute = to Massimiliano
;x=prif "disegnatore" "Massimiliano" setattr
;Sets the 'data' attribute with the dd/mm/yyyy format
;x=prif "DATA" "%d/%m/%Y" time setattr
[changeattr]
;Setting attributes when modifying an attribute
;Sets the 'descrizione' attribute with the modified part name
$name=prif "descrizione" value setattr
;Sets the part name with the value of the modified 'descrizione' attribute
descrizione=prif "$name" value setattr
;Sets the 'codice' attribute = to the modified 'disegno' attribute