Spring variable


This parameter is actually a set of three outputs, which can write the name, value and units of a variable onto the page.

Inputs


Input name

Optional/required

Notes

Position

Required

Write the text at location (x,y). Position is relative to the top-left of the page, measured in mm. Note: this is the co-ordinate of the bottom left of the text block.


If position (x2,y2) is also included, the text will fit within the box defined, and word-wrap as needed.

FontDetails

Required

size: height of the font in mm (required)

name: name of the font (optional, defaults to Arial)

fontweight: if 1, text is written in bold (optional)

italic: if 1, text is written in italics (optional)

underline: if 1, text is underlined (optional)

Colour

Optional

Can be either a/r/g/b values (see the Line type for an example), or the name of a colour. Defaults to black.

SpringVariableName

Required

The name of the variable.


Example


       <PrintElement name="SpringVariableLabel">

               <Position x="20" y="10" ></Position>

               <FontDetails size="5" name="Arial"></FontDetails>

               <SpringVariableName>WireDiameter</SpringVariableName>

       </PrintElement>

       <PrintElement name="SpringVariableValue">

               <Position x="60" y="10" ></Position>

               <FontDetails size="5" name="Arial" fontweight="1"></FontDetails>

               <Colour>red</Colour>

               <SpringVariableName>WireDiameter</SpringVariableName>

       </PrintElement>        

       <PrintElement name="SpringVariableUnits">

               <Position x="80" y="10" ></Position>

               <FontDetails size="5" name="Arial"></FontDetails>

               <SpringVariableName>WireDiameter</SpringVariableName>

       </PrintElement>



This produces the following output: