Advanced Line Style Functionality
- Last UpdatedApr 27, 2023
- 3 minute read
It is possible to add a repeated ‘decoration’ to a line style. The ‘decoration’ can be a glyph or a text string (or indeed both together).
If a repeated glyph is required, attributes must be defined:
|
GLYREF |
The reference of the user-defined glyph |
|
GLYNUM |
The user-defined glyph number. |
These two attributes are mutually exclusive – setting one unsets the other. User-defined and system-defined glyphs are described. Refer to Glyphs for further information. For example:
GLYREF /flow-arrow
GLYNUM SYSpattern 15
GLYNUM can be set OFF, causing both GLYNUM and GLYREF to be unset.
|
DECMOD |
A code number (1-7) to signify how the glyphs in respect to the line style are to be distributed. The default value is 3. The code number is interpreted as: |
|
|
1-3 |
Glyphs spaced along the line. DECMOD 3 is recommended to give the best overall results. Values 1 or 2 can give untidy effects at the ends of spans. |
|
|
4 |
One glyph at the end of the line. |
|
|
5 |
One glyph at the start of the line, with its axes reversed. |
|
|
6 |
A glyph at each end of the line, the first having its axes reversed. |
|
|
7 |
One glyph at the centre of the line. |
|
|
DECSIZ |
The size to which the glyph reference size is scaled. |
|
|
DECREP |
The approximate repeat distance between glyphs. The first glyph has its origin at half the repeat distance from the start of the line. With DECMOD = 2 or 3 DRAW adjusts the specified repeat distance so as to give an integer number of repeats. With DECMOD = 4, 5 or 6 the DECREP value is ignored. |
|
|
DECGAP |
The length of each gap left in the path. if no gaps are required, this can be 0. If it exceeds the glyph repeat distance then the path itself is completely omitted – only the glyphs are drawn. The default value is 0. |
Note:
All Draw’s pre-defined glyphs (except numbers 10, 11 and 20) have their origins at their centres
and thus a repeat distance of 0 with DECMOD = 4, 5 or 6 causes them to be centered
upon the end(s) of the line. The setting is generally satisfactory for balloons or
dots, but with arrowheads it would cause the line to display longer than defined.
For forward arrows, the glyph is set back by a distance from the line end (usually
half the glyph size). To avoid over long lines for reversed arrows, the repeat distance
must be equal to the DECSIZ value. The origin of each glyph is positioned at half
the repeat distance from the end of the line.
If a repeated text string is required, attributes DECMOD, DECSIZ, DECREP and DECGAP must be set. For text strings DECSIZ specifies the character height.
In addition, these attributes must be set:
|
TXSTRI |
The text string required (32 characters maximum) |
|
TXALIG |
The vertical alignment. Permitted values are BOTTOM (the default), CENTRE, TOP. |
|
FONT |
The font to be used. The font must be a TrueType font. The functionality is not available for use with AVEVA fonts. |
TXSTRI can be a simple Intelligent Text string, for example #ELEVAT, which will be expanded in the context of the element being drawn. To handle the potentially variable length of the resulting string, a non-zero DECGAP will be increased by the number of characters in the string multiplied by DECSIZ so that the line is not drawn under the text.
Text strings and glyphs can both be defined but they have to have common values for DECMOD, DECSIZ, DECREP, and DECGAP.
Note that the DECSIZ, DECREP, and DECGAP parameters are affected by scale. If a linestyle with these parameters set is used:
-
to define a Symbol Template then, when that template is instanced by a Symbol, the size and frequency of the glyphs and texts are affected by the scale of the Symbol;
-
to define 3D design graphics then the size and frequency of the glyphs and texts are reduced by the View scale.