Line
The line draws a pipe, a cable or an arrow. Points are “x,y” pairs relative to the element’s corner, so one line can be a polyline with any number of bends: 0,0 200,0 200,80. Arrows at the start and the end show the flow direction, a dashed line shows a standby or disconnected line.
The pipe color by flow is set with the Appearance animation bound to a tag.
Properties
Section titled “Properties”Besides the properties of every element — name, position, size, tooltip, rotation, transparency and the operate right:
| Property | Values | Default | Description |
|---|---|---|---|
Points |
text | 0,0 200,0 |
Points. “x,y” pairs separated by spaces, relative to the element corner: 0,0 200,0 200,80 |
Stroke |
#RRGGBB |
#5C646C |
Color |
StrokeThickness |
number | 4 |
Thickness |
DashStyle |
Solid, Dash, Dot, DashDot |
Solid |
Line style |
StartArrow |
true / false |
false |
Arrow at start |
EndArrow |
true / false |
false |
Arrow at end. Flow direction |
From scripts
Section titled “From scripts”Item.Type = Line. Any property is read and changed by name: Item.Stroke = "#D32F2F". The common element members (Visible, Enabled, Value, Raise, Apply…) are described in Elements from scripts.
Events
Section titled “Events”Mouse, hover, focus and keyboard — as for any element (see Events and functions).
Examples
Section titled “Examples”The pipe turns blue while water flows and becomes dashed when the valve is closed.
var pipe = Screen.Items("Pipe_Supply");var open = Tags("Valve1.Open").Value;pipe.Stroke = open && Tags("Pump1.Run").Value ? "#2F7DBF" : "#9AA3AB";pipe.DashStyle = open ? "Solid" : "Dash";Reverse flow: the arrow moves to the start of the line.
var reverse = Tags("Flow.Value").Value < 0;Item.StartArrow = reverse;Item.EndArrow = !reverse;