UL_LABEL

Data members

   
angle real (0.0...359.9)
layer int
mirror int
spin int
text UL_TEXT
x, y int (origin point)
xref int (0=plain, 1=cross-reference)

Loop members

   
wires() UL_WIRE (see note)

See also UL_SEGMENT

Note

If xref returns a non-zero value, the wires() loop member loops through the wires that form the flag of a cross-reference label. Otherwise it is an empty loop.

The angle, layer, mirror and spin members always return the same values as those of the UL_TEXT object returned by the text member. The x and y members of the text return slightly offset values for cross-reference labels (non-zero xref), otherwise they also return the same values as the UL_LABEL.

xref is only meaningful for net labels. For bus labels it always returns 0.

Example

sheet(SH) {
  SH.nets(N) {
    N.segments(S) {
      S.labels(L) {
        printf("Label: (%f %f) '%s'", u2mm(L.x), u2mm(L.y), L.text.value);
        }
      }
    }
  }