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

Hull and Outfitting

Specifying the Pen Selection Mode and Plotting Attributes

Specifying the Pen Selection Mode and Plotting Attributes

  • Last UpdatedOct 27, 2023
  • 3 minute read

By default, any logical pen numbers (which usually correspond to particular colours), line styles and line widths defined in the source pseudo-code file (plotfile) are passed unchanged to the output file or device (output). You can intercept these settings, and modify them to achieve independent control of the way in which the output is plotted, by using the PENS and associated ATTR (attributes) commands. PLOT can have up to 256 pens, and can operate in the following modes:

'Pens Yes' Mode

The default mode, which may be reset by using the option

PEns Yes

This options causes pen numbers, line styles and line widths to be passes directly from the input file to the output file.

To redirect one or more pens, use the command line option

ATTR integer1 integer2

This replaces input pen integer1 with output pen integer2. For example, the options:

PENS YES,ATTR 1 4,ATTR 2 5,ATTR 3 6

This sets pens 1-3 in the input file to be replaced by pens 4-6 in the output file, respectively. Line styles and line widths are passed unchanged from the input file to the output file.

'Pens No' Mode

The option:

PEns No

This sets the individual pen numbers from the input file to be ignored and all output to be plotted using pen 1. You might use this mode, for instance, when the output is intended for a single-pen device.

To redirect the output to use a pen other than pen 1, use the command line option:

ATTR 1 integer

Here, integer specifies the required output pen number. For example, the options:

PENS NO,ATTR 1 3

This causes all output to be plotted using pen 3, regardless of any pen settings defined in the input file. Line styles and line widths are passed unchanged from the input file to the output file.

'Pens Attr' Mode

The option:

PEns Attr

This passes only the pen numbers from the input file to the output file. All line style and line width settings in the input file are ignored, the settings for these in the output file being determined by the attributes set for the corresponding pen number.

To specify the line style and width corresponding to any output pen, and to redirect pens if required, use the option:

ATTR  integer1  integer2  linestyle  linetype  width

This substitutes output pen integer2 for input pen integer1 and sets its line style to linestyle and its line width to linetype with optional width value.

Possible settings for linestyle are SOlid, DOt, DAsh, CHain or DChain. The default, if linestyle is omitted, is SOLID.

Possible settings for linetype are Normal or Thick. The default, if linetype is omitted, is NORMAL. THICK is optionally followed by the width value, expressed in millimeters. If width is omitted the default line thickness is set by the driver.

For example, the options:

PENS ATTR,ATTR 2 1 DOT,ATTR 3 1 CHAIN THICK

This sets input pen 2 to be output as dotted and normal thickness lines and input pen 3 to be output as chained thick lines, both using output pen 1.

'Pens Same' Mode

The option:

PEns Same

The causes all input pen numbers, line styles and line widths to be ignored. All output is output with pen 1 only (unless redirected), and all with the same line style and line width (solid and normal thickness by default).

To redirect the output to use a different single pen, and to specify the line style and line width for all output, use the command line option:

ATTR 1  integer  linestyle  linetype  width

Here, integer specifies the required output pen number and the other arguments set its line style to linestyle and its line width to linetype with optional width value.

Possible settings for linestyle are SOlid, DOt, DAsh, CHain or DChain. The default, if linestyle is omitted, is SOLID.

Possible settings for linewidth are Normal or Thick. The default, if linetype is omitted, is NORMAL. THICK is optionally followed by the width value, expressed in millimeters. If width is omitted the default line thickness is set by the driver.

For example, the options:

PENS SAME,ATTR 1 4 CHAIN THICK 0.7

This causes all output to be output as chained thick lines with a width of 0.7 mm and pen 4. All pen settings, line styles and line widths defined in the input file are ignored.

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