1 (define default-position-of-text-attributes
2 ; Specifies the default position of text attributes.
3 ; Each list entry is a list specifying the position of a text attribute.
4 ; Dividing each list entry in two lines:
5 ; - the first line is the attribute matching. It specifies the properties
6 ; of the object and the attribute that should match in order to use
7 ; that entry (all the specified properties should match).
8 ; It has the following items:
9 ; - attrib_name: the attribute's name for this entry.
10 ; - direction: direction of the pin(s) (the arrow points to the inside
11 ; of the symbol. The direction is specified by one character of
12 ; v, ^, < or >. This item is a string with one or several direction
13 ; characters. Including several directions here means that the
14 ; object should have pins in all those directions if using this
17 ; - list of object attribute matching properties. It's a list with
18 ; attribute_name, attribute_value pairs. A regular expression can be
19 ; used in the attribute_values field.
20 ; There is a special attribute name: "OBJ_TYPE" if you want to check
21 ; the object type. However, the attribute_value field should be
22 ; one of the already defined variables:
23 ; OBJ_LINE, OBJ_BOX, OBJ_PICTURE, OBJ_CIRCLE, OBJ_NET, OBJ_BUS,
24 ; OBJ_COMPLEX, OBJ_TEXT, OBJ_PIN, OBJ_ARC, OBJ_PLACEHOLDER
25 ; converted into strings (for example using the function char2str).
27 ; - the second line defines where and how the attribute will be placed.
28 ; The attribute is going to be placed at a position of the
29 ; component, given by the "reference" item.
30 ; It has the following items:
31 ; - x_offset, y_offset: the position offset to the reference point.
32 ; The attribute position is offset by these amounts from the
33 ; reference point. They can be positive or negative integers.
34 ; - reference: the component's reference point where to place
35 ; the attribute. The reference point is calculated using
36 ; component's bounds, so pin's line width, for example, matter.
37 ; Example: Pin from (100,50) to (400,50), pin's line width is 10.
43 ; "Lower left": (95,45)
44 ; It is a string with the format "horizontal vertical", where:
45 ; - "horizontal" is one of: "Left", "Middle", "Right".
46 ; - "vertical" is one of: "Lower", "Middle", "Upper".
47 ; Example: "Lower Right".
48 ; - alignment: the attribute text's alignment.
49 ; - angle: the attribute's angle.
51 ; As a special case, the attributes can be automaticaly moved if
52 ; they overlap with the pins or the pin connection direction, in
53 ; order to avoid cluttering the schematic. Note that pinnames are
54 ; also included when calculing the new position.
55 ; By pin connection direction I mean the space in front of a pin
56 ; where a net connecting to that pin is supposed to be drawn
59 ; For this purpose, two more items are added:
60 ; - mov_dir: specify the movement directions, or where can the
61 ; attribute be moved if overlapping.
62 ; It is an empty string if no movement is allowed, or a string
63 ; containing one or several horizontal/vertical directions.
64 ; Each direction is specified with one character of v,^,< or >.
66 ; When overlapping with vertical pins, the attribute will be
67 ; moved horizontally (< or > characters).
68 ; When overlapping with horizontal pins, the attribute will be
69 ; moved vertically (v or ^ characters).
71 ; Example: "<^" means that the attribute will be moved to the
72 ; left if overlapping with vertical pins, or to the top if
73 ; overlapping horizontal pins.
75 ; - spacing: minimum spacing between the attributes and the pins.
76 ; It sould be a positive integer number.
78 ; - color: the color to assign to the attribute. A -1 will leave
79 ; the color unchanged.
81 ;Attrib_name Direct. Attribute_match <--- first line of each entry.
82 ;X_offset Y_offset Reference Alignment Angle Mov_dir Spacing (>0) Color
86 "pinlabel" ">" (list "OBJ_TYPE" (char2str OBJ_PIN))
87 50 0 "Lower Right" "Lower Left" 0 "" 0 9)
89 "pinlabel" "<" (list "OBJ_TYPE" (char2str OBJ_PIN))
90 -50 0 "Lower Left" "Lower Right" 0 "" 0 9)
92 "pinlabel" "^" (list "OBJ_TYPE" (char2str OBJ_PIN))
93 0 50 "Upper Middle" "Lower Left" 90 "" 0 9)
95 "pinlabel" "v" (list "OBJ_TYPE" (char2str OBJ_PIN))
96 0 -50 "Lower Middle" "Lower Right" 90 "" 0 9)
98 "pinnumber" ">" (list "OBJ_TYPE" (char2str OBJ_PIN))
99 -100 50 "Lower Right" "Lower Right" 0 "" 0 -1)
101 "pinnumber" "<" (list "OBJ_TYPE" (char2str OBJ_PIN))
102 100 50 "Lower Left" "Lower Left" 0 "" 0 -1)
104 "pinnumber" "^" (list "OBJ_TYPE" (char2str OBJ_PIN))
105 -50 -100 "Upper Middle" "Lower Right" 90 "" 0 -1)
107 "pinnumber" "v" (list "OBJ_TYPE" (char2str OBJ_PIN))
108 -50 100 "Lower Middle" "Lower Left" 90 "" 0 -1)
110 ; Component attributes
113 "refdes" "<" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
114 0 50 "Upper Middle" "Lower Middle" 0 "" 0 -1)
116 "value" "<" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
117 0 -50 "Lower Middle" "Upper Middle" 0 "" 0 -1)
119 "device" "<" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
120 0 -50 "Lower Middle" "Upper Middle" 0 "" 0 -1)
122 "refdes" ">" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
123 0 50 "Upper Middle" "Lower Middle" 0 "" 0 -1)
125 "value" ">" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
126 0 -50 "Lower Middle" "Upper Middle" 0 "" 0 -1)
128 "device" ">" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
129 0 -50 "Lower Middle" "Upper Middle" 0 "" 0 -1)
131 "refdes" "^" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
132 0 100 "Middle Left" "Lower Right" 0 "" 0 -1)
134 "value" "^" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
135 0 -100 "Middle Left" "Lower Right" 0 "" 0 -1)
137 "device" "^" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
138 0 -100 "Middle Left" "Lower Right" 0 "" 0 -1)
140 "refdes" "v" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
141 0 100 "Middle Left" "Lower Right" 0 "" 0 -1)
143 "value" "v" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
144 0 -100 "Middle Left" "Lower Right" 0 "" 0 -1)
146 "device" "v" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
147 0 -100 "Middle Left" "Lower Right" 0 "" 0 -1)
150 "refdes" "<>" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
151 0 50 "Upper Middle" "Lower Middle" 0 "" 0 -1)
153 "value" "<>" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
154 0 -50 "Lower Middle" "Upper Middle" 0 "" 0 -1)
156 "device" "<>" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
157 0 -50 "Lower Middle" "Upper Middle" 0 "" 0 -1)
159 "refdes" "^v" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
160 50 100 "Middle Right" "Lower Left" 0 "" 0 -1)
162 "value" "^v" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
163 50 -100 "Middle Right" "Lower Left" 0 "" 0 -1)
165 "device" "^v" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
166 50 -100 "Middle Right" "Lower Left" 0 "" 0 -1)
169 "refdes" "<^v" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
170 -50 100 "Middle Left" "Lower Right" 0 "" 0 -1)
172 "value" "<^v" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
173 -50 -100 "Middle Left" "Lower Right" 0 "" 0 -1)
175 "device" "<^v" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
176 -50 -100 "Middle Left" "Lower Right" 0 "" 0 -1)
178 "refdes" ">^v" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
179 50 100 "Middle Right" "Lower Left" 0 "" 0 -1)
181 "value" ">^v" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
182 50 -100 "Middle Right" "Lower Left" 0 "" 0 -1)
184 "device" ">^v" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
185 50 -100 "Middle Right" "Lower Left" 0 "" 0 -1)
187 "refdes" "<>v" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
188 -50 -50 "Lower Middle" "Upper Right" 0 "" 0 -1)
190 "value" "<>v" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
191 50 -50 "Lower Middle" "Upper Left" 0 "" 0 -1)
193 "device" "<>v" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
194 50 -50 "Lower Middle" "Upper Left" 0 "" 0 -1)
196 "refdes" "<>^" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
197 -50 50 "Upper Middle" "Lower Right" 0 "" 0 -1)
199 "value" "<>^" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
200 50 50 "Upper Middle" "Lower Left" 0 "" 0 -1)
202 "device" "<>^" (list "OBJ_TYPE" (char2str OBJ_COMPLEX))
203 50 50 "Upper Middle" "Lower Left" 0 "" 0 -1)
206 "refdes" "<>^v"(list "OBJ_TYPE" (char2str OBJ_COMPLEX))
207 50 50 "Upper Left" "Lower Left" 0 "^<" 50 -1)
209 "value" "<>^v"(list "OBJ_TYPE" (char2str OBJ_COMPLEX))
210 50 -50 "Lower Right" "Upper Right" 0 "v>" 50 -1)
212 "device" "<>^v"(list "OBJ_TYPE" (char2str OBJ_COMPLEX))
213 50 -50 "Lower Right" "Upper Right" 0 "v>" 50 -1)
218 "netname" "<>" (list "OBJ_TYPE" (char2str OBJ_NET))
219 0 50 "Upper Middle" "Lower Middle" 0 "" 0 -1)
221 "netname" "^v" (list "OBJ_TYPE" (char2str OBJ_NET))
222 -50 0 "Middle Middle" "Lower Middle" 90 "" 0 -1)
226 "netname" "<>" (list "OBJ_TYPE" (char2str OBJ_BUS))
227 0 50 "Upper Middle" "Lower Middle" 0 "" 0 -1)
229 "netname" "^v" (list "OBJ_TYPE" (char2str OBJ_BUS))
230 -50 0 "Middle Middle" "Lower Middle" 90 "" 0 -1)
233 ; Position of parameters inside default-position-of-text-attributes
234 (define def-attrib-name-pos 0)
235 (define def-direction-pos 1)
236 (define def-attrib-match 2)
237 (define def-x-offset-pos 3)
238 (define def-y-offset-pos 4)
239 (define def-reference-pos 5)
240 (define def-alignment-pos 6)
241 (define def-angle-pos 7)
242 (define def-move-pos 8)
243 (define def-spacing-pos 9)
244 (define def-color-pos 10)