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-modulecontext.<Text>- ATextshape instance that describes the features of the value label for this component instance.- The
Textobject 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
mpnoremodelstatements. - In the
pcb-symbolof this component instance:- If there exists one or more
layer(...) = Text(">VALUE" ...)statements - then the passedTextobject's string value (in this casemy-component-value) will replace the>VALUEof those text objects and leave the size, anchor, and pose parameters will remain unchanged.
- If there exists one or more
- In the
pcb-landpatternof this component instance:- It constructs a new
layer(Silkscreen("f-silk", Top)) = ...statement with the suppliedTextobject. - All
Textobjects on any valid layer will be inspected for a>VALUEcontent string. For all of those instances - only the string replacement will occur. In the case above the>VALUEwill becomemy-component-valueand the size, anchor, and pose parameters will remain unchanged.
- It constructs a new