You are here: Other topics > Plotting > The plotter.chr File
GEOVIA Surpac

Plotter.mst and Plotter.chr

The two files plotter.mst and plotter.chr contain a list of all plotters supported, and any commands required for the plotters to function correctly.

The two files have an identical format. plotter.mst is a master reference file containing standard plotter parameters. It is updated during each software update to reflect the latest range of supported devices.

plotter.chr is the file from which the actual plotter parameters are read. It is a copy of the plotter.mst file which was originally installed with the software.

Computer System Administrators with special plotter configurations may modify their own plotter.chr file. For example, a 'Frame Advance' command may be included in the plotter commands for a plotter with a spool paper feed.

The format of the file is:

Record Columns Description
1 21-22 The number of plotters in the list following this record; N.
2-(N+1) 11-20 Max 10 character unique plotter ID.
31-40 Max 10 character ID of plotter family. Must be HPGL2 or WIN32

Following these records are commands for each plotter (if any are required), defined between pairs of records like:

plotid
.
.
 .
 . parameters
 .
END

where 'plotid' is a 6 character plotter ID listed in the first part of the file.

A 'command' consists of a key word followed by a line of '.' to column 19 and terminated by a 'space' in column 20. Any parameters related to the command begin in column 21 as described below.

Commands Available

Command Purpose
INIT Columns 21-80 contain a character string which is written as the initial lines to the '.plt' file. Non-printing characters may be included as 3 digit ASCII codes between angle brackets e.g. ESC = <027>.
STEPCM Columns 21-30 contain a value for the number of plotter steps per centimetre in the X direction, and columns 31-40 contain a corresponding value for the Y direction. These are usually the same. If the Y value is omitted it is set to the same as the X value. If this command is omitted, the default value of 400 steps/cm is used.
TERM Columns 21-80 contain a character string which is written to the end of the .plt file. Escape sequences may be entered as for the INIT string.
ORIGIN Defines whether the 0,0 co-ordinate of the plotter is in the centre of the plot area of at the lower left of the sheet, a `C' in column 21 specifies a `centre' origin and `L' specifies the lower left.

When the `L' input is chosen columns 22-31 and 32-41 may contain X and Y offset values in plotter units which will be added to generated plotter co-ordinates having the effect of moving the plot further towards the lower left, allowing for a larger plot area.

e.g. with a STEPCM value of 400 for X and Y, the command:

ORIGIN............. L 400 400

will move the plot origin 1cm left and 1 cm down.

The hpgl2.pen file

The hpgl2.pen file is used to set up defaults for all the HPGL/2 parameters that are available on the Plotter Drivers form. The file is created as part of the form input so it can be modified easily. It is recommended that you only make changes to this file via the Plotter Drivers form and do not edit it with a text editor. This is so you do not corrupt the structure or input invalid values into the file.

The file structure is:

line keyword description
1 media type the default media to plot to
2 plot quality the plot quality setting
3 pen sort the pen sorting method to use
4 plot rotation angle to rotate plot by
5 reserved reserved for future use
6 reserved reserved for future use
7 reserved reserved for future use
8 - 1006 pen descriptions in the following format pen number, pen colour, pen width (mm), pen velocity (cm/sec)

A sample hpgl2.pen file is given below.

media type = paper
plot quality = 100
pen sort method = all
plot rotation = 0
reserved
reserved
reserved
1 ,black ,0.25 ,80
2 ,red ,0.25 ,80
3 ,green ,0.25 ,80
4 ,yellow ,0.25 ,
5 ,blue ,0.25 ,
6 ,magenta ,0.25 ,
7 ,cyan ,0.25 ,
8 ,blue green ,0.2 ,
9 ,brick red ,0.8 ,
10,cadet blue ,0.4 ,
11, , ,
12, , ,
 .
 .
 .
997, , ,
998, , ,
999, , ,