Skip to content

value-label

The value-label statement is used to override or set the value parameter of a component instance that maps to the >VALUE template.

This statement is only valid from within the pcb-module context.

Signature

value-label(<INST>) = <Text>
  • &lt;INST> - A ref to an instance of a component in the current pcb-module context.
  • &lt;Text> - A Text shape instance that describes the features of the value label for this component instance.
  • The Text object will define the location, pose, size, and font for the value label.
  • The string content of the text can be any value without restriction.

Usage

The >VALUE template string can be applied in pcb-symbol and pcb-landpattern layer statements with the Text object. This is a convenient template string to use to show a resistor's value in the schematic.

The value-label can override the substituted string used for the >VALUE template.

    ; name the test point, 
    value-label(my-component) = Text("my-component-value", 1.0, W, loc(1.2, 0.0))

This new Shape (of type Text) will be used to:

  1. Override any existing value parameter as defined in the mpn or emodel statements.
  2. In the pcb-symbol of this component instance:
    1. If there exists one or more layer(...) = Text(">VALUE" ...) statements - then the passed Text object's string value (in this case my-component-value) will replace the >VALUE of those text objects and leave the size, anchor, and pose parameters will remain unchanged.
  3. In the pcb-landpattern of this component instance:
    1. It constructs a new layer(Silkscreen("f-silk", Top)) = ... statement with the supplied Text object.
    2. All Text objects on any valid layer will be inspected for a >VALUE content string. For all of those instances - only the string replacement will occur. In the case above the >VALUE will become my-component-value and the size, anchor, and pose parameters will remain unchanged.