Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Hull and Outfitting

User-Defined Line Styles

  • Last UpdatedDec 02, 2025
  • 5 minute read

Basic Line Style Functionality

User-defined Line Styles are defined in the database by LINESTyle elements which are members of a Line Style Table (LSTYTB) element.

To be valid the definition of a LINEST must include (at the minimum) definitions for dash-pattern geometry, pattern repeat distance and line width.

The dash-pattern geometry can be defined in two ways, either by specifying an existing system-defined pattern by name or by specifying a sequence of integer numbers that define the relative lengths of the sequence of dashes and gaps that make up the pattern. These two ways are defined by the attributes PATNAM and PATDEF; these are mutually exclusive – setting one will unset the other.

PATNAMe

The name of an existing system-defined line pattern (eg LDASHED) to be used as the basis of the user-defined line style. (see Figures 8:1 and 8:2 above for the line patterns that can be used). By default PATNAM will be set to SOLID.

PATDEFinition

A series of integers (max 20) that define the relative lengths of the dashes and gaps. A dash is represented by a positive value and a gap by a negative value. Dashes and gaps must alternate and we recommend that the pattern sequence starts with a dash.

LWIDTH

The width of the line (in mm or inches). Value 0 is allowed and means the minimum-allowed line width. The maximum allowed width is 2mm (0.078inch).

PATREPeat

The approximate distance at which the pattern is to be repeated and to which the sum of all the lengths of the dashes and gaps are scaled.

Thus for example:

NEW LINEST /LS1

PATNAM DCHAINED

PATREP 45mm

LWIDTH 0.2mm

will produce a linestyle similar to the user-defined DCHAINEDMEDIUM style but with a greater repeat distance.

And:

NEW LINEST /LS2

PATDEF 10 -3 5 -3 5 -3 10

PATREP 30mm

LWIDTH 0

will produce a linestyle of two short dashes inserted between pairs of long dashes. The repeat distance is 30mm and a minimum line width is specified.

Element LINEST also has attributes:

LSTYNO

This is a system-defined attribute that will have a unique value within the MDB. It is this number that should be used when the Linestyle is used.

FUNC

Text attribute for descriptive purposes.

ALTDEF

If set it must refer to another LINEST. If set the referenced LINEST will be used on hard copy output. Thus if at /My-Linestyle:

ALTDEF is set to /My-Plot-Linestyle it is /My-Plot-Linestyle that will be used on hardcopy output in place of /My-Linestyle.

When the LINEST element is created a system-defined line style number is allocated automatically. This is a unique number in the range 1-255 and is held in the LSTYNO attribute of the LNEST element. This is the number to use for a linestyle attribute (eg NLSTYLE) when it is required to use that LINEST.

Alternatively, it is usually more convenient to specify a name for the LINEST, and then this is used to set the linestyle attribute (although it will be the LSTYNO value that will be assigned to the linestyle attribute). Thus for example:

NLSTYLE 3

DLSTYLE /DimLineStyle-1

Having created a Linestyle it must be defined within the graphics system by an UPDATE PENSTYLES command if it is to be used during that session of DRAFT. In subsequent sessions it will be automatically defined during module entry.

Advanced Line Style Functionality

It is possible to add a repeated ‘decoration’ to a line style. This ‘decoration’ may be a glyph or a text string (or indeed both together).

If a repeated glyph is required the following attributes have to be defined:

GLYREF

The reference of the user-defined glyph

GLYNUM

The user-defined glyph number.

These two attributes are mutually exclusive – setting one will unset the other. for further information of user-defined and system-defined glyphs see Glyphs. For example:

GLYREF /flow-arrow

GLYNUM SYSpattern 15

GLYNUM may be set OFF. This will cause both GLYNUM and GLYREF to be unset.

DECMOD

A code number (1-6) to signify how the glyphs are to be distributed. The default value is 3. The code number is interpreted as follows:

1-3

Glyphs spaced along the line. DECMOD 3 is recommended to give the best overall results. Values 1 or 2 may 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.

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 Draft will adjust the specified repeat distance so as to give an integer number of repeats. With DECMOD = 4, 5 or 6 the glyphs will be placed with their origins at half the repeat distance from the appropriate ends. With DECMOD = 4, 5 or 6 the repeat distance may be 0, otherwise it must be greater than 0.

DECGAP

The length of each gap left in the path. This may be 0 if no gaps are required. If it exceeds the glyph repeat distance then the path itself will be completely omitted – only the glyphs will be drawn. The default value is 0.

Note: All Draft’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 will cause them to be centered upon the end(s) of the line. This is generally satisfactory for balloons, dots, etc but with arrowheads it will cause the line to appear longer than defined. To avoid this the repeat distance should be equal to the DECSIZ value. This will cause the origin of each glyph to be 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 as described above. For text strings DECSIZ specifies the character height.

In addition the following 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. This must be a TrueType font. This functionality is not available for use with AVEVA fonts.

Text strings and glyphs can both be defined but they have to have common values for DECMOD, DECSIZ, DECREP, and DECGAP.

Users should note that the DECSIZ, DECREP, and DECGAP parameters are affect by scale. This means that 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 will be affected by the scale of the Symbol;

  • to define 3D design graphics then the size and frequency of the glyphs and texts will be reduced by the View scale.

Related Links
TitleResults for “How to create a CRG?”Also Available in