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>
<INST>
- A ref to an instance of a component in the currentpcb-module
context.<Text>
- AText
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:
- Override any existing value parameter as defined in the
mpn
oremodel
statements. - In the
pcb-symbol
of this component instance:- If there exists one or more
layer(...) = Text(">VALUE" ...)
statements - then the passedText
object's string value (in this casemy-component-value
) will replace the>VALUE
of those text objects and leave the size, anchor, and pose parameters will remain unchanged.
- If there exists one or more
- In the
pcb-landpattern
of this component instance:- It constructs a new
layer(Silkscreen("f-silk", Top)) = ...
statement with the suppliedText
object. - 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 becomemy-component-value
and the size, anchor, and pose parameters will remain unchanged.
- It constructs a new