DashStyle
The DashStyle property defines the type of dashed lines that are used for a dashed line/outline.
Typically, you would set the DashStyle by defining the appearance of the dashes on the Line tab of the Polyline Properties window or the Text Properties window. However, you could use an expression to define the DashStyle or to animate the DashStyle according to the value or state of a database item.
Each DashStyle has a number that you can enter in an expression:
Number for Expression | Style |
---|---|
0 |
Solid line |
1 |
Dashed line |
2 |
Dotted line |
3 |
Dash-Dot line |
4 |
Dash-Dot-Dot line |
For example, you could animate the DashStyle so that it changes when a point has an unacknowledged uncleared alarm. The expression for this is:
LOOKUP( "<Path and name of point>.AlarmState" + 1, 0, 0, 0, 0, 4)
Where <path and name of point> is the location and name of the database point (do not enter the angle brackets < > ). AlarmState is the point property that affects the dashes and the numerical values are:
- +1 is needed as LOOKUP is 1 based (starts from 1) whereas the point's alarm states are 0 based (start from 0).
- The first 0 is the DashStyle that will be applied when the point is in has no alarms (is in a normal state). DashStyle 0 is a Solid line.
- The second 0 is the Type that will be applied when the point has its alarms disabled. DashStyle 0 is a Solid line.
- The third 0 is the Type that will be applied when the point has an Acknowledged Uncleared alarm. DashStyle 0 is a Solid line.
- The fourth 0 is the DashStyle that will be applied when the point has an Unacknowledged Cleared alarm. DashStyle 0 is a Solid line.
- The 4 is the DashStyle that will be applied when the point has an Unacknowledged Uncleared alarm. DashStyle 4 is Dash-Dot-Dot.
This means that the outline will be a solid line unless the point has an unacknowledged uncleared alarm.