Line-type string
The line type defines how lines and curves are implemented, such as the borders for rectangles, circles, ellipses, polygons and plain texts. A line-type definition has five different parameters in WinCC OA, which must all be passed in a line-type string.
Syntax
"[Type,Dash,Join,Termination,Thickness]"
The string must not contain any spaces. Spaces after commas for instance will mask the associated parameter.
| Parameter | Valid values | Comment |
|---|---|---|
| Type | ||
| solid | continuous | |
| dashed | dashed | |
| dotted | dotted | |
| dash_dot | dash-dot | |
| dash_dot_dot | dash-dot-dot | |
| Dash | ||
| oneColor | single color dashes (dash back ground color is set transparent) | |
| twoColor | two-color dashes (foreground color between dash background color) | |
| Join | ||
| JoinMiter | pointed | |
| JoinRound | round | |
| JoinBevel | beveled | |
| Termination | ||
| CapNotLast | shortened | |
| CapButt | edge | |
| CapRound | round | |
| CapProjecting | extended (not in Vision) | |
| Thickness | ||
| 0 ... 50 |
0 ... thinnest line 50 ... thickest line |
Example
For the rectangle 1, a solid single-color line, with a thickness of three points, sharp corners is set:
main()
{
int x;
x=setValue("rectangle1", "border", "[solid,oneColor,JoinMiter,CapNotLast,4]");
}
For the rectangle 2, a dashed, two colored line with a thickness of 3 points and round corners is set:
main()
{
int x;
x=setValue("RECTANGLE2","border","[dashed,twoColor,JoinRound,CapRound,3]");
}