Go to: Bottom - FAQ Index - EMME/2 Support Center Home Page

FAQ: OTHER UTILITIES FOR EMME/2


This compilation of frequently asked questions is still under construction. It will get updated on an irregular basis, depending on the time I have available and the ideas that emerge from my support activities. This document has last been changed on May 31, 1996 .


Contents


1. Configuring and Using GPL


1.1. What is GPL?

GPL is a general utility program which can transform EMME/2 plot files to a large class of vector based plotter languages and graphic protocols. The type of transformation is defined in a GPL format file. These format files usually have the file name extension .gpl and are located in the emme2/lib directory. The output of GPL can either be routed directly to the plotting device or can be saved in a disk file.


1.2. What protocols are supported by GPL?

GPL itself does not know any specific protocol, except the EMME/2 plot file protocol needed to read the plot file. The supported output protocols depend entirely on the available GPL format files. In principle, any graphic command language which is vector based (i.e. not based on bitmaps - see GPR for those) can be supported by GPL. Format files for the following standard protocols are provided with as part of the EMME/2 software distribution:

HPGL
Hewlett-Packard Graphic Language (quasi-standard for most plotters and many laser printers)
PostScript
Adobe's famous page description language (supported by most up-scale laser printers)
DXF
AUTOCAD's ASCII Drawing Interchange File Format (not used directly by plotters, but very useful to import EMME/2 plots into CAD or GIS systems for further manipulations)
HI
Houston Instruments proprietary DM/PL plotter command language (probably not used very much any more)
MIF
FrameMaker's MIF format (provides one way to import EMME/2 plots into Frame documents -- but using PostScript is probably preferable)
CC906
The original Calcomp plotter protocol (a real monster -- fortunately most newer Calcomp plotters also emulate HPGL)
MSX
Sony's MSX plotter/printer protocol (a historic relict from the old days before the IBM PC -- my very first "plotter" was a tiny Sony PRN-C41 ball point pen plotter using this protocol)
ANNOT
EMME/2 annotation format (allows transforming an EMME/2 plot into an EMME/2 annotation, which in turn can again be included into an EMME/2 plot ...)

Some special adaptations of these format files and user contributed format files are available in the GPR/GPL section of the file archive of this Web site.


1.3. Where is GPL documented?

A fully detailed documentation of GPL can be found in section 7.3 of the EMME/2 User's Manual.


1.4. Can I write my own GPL format file?

Yes. The section 7.3.3 (Customizing GPL) of the EMME/2 User's Manual contains a detailed description of the contents and layout of GPL format files. With this information writing you own GPL format file (or modifying existing ones to your special needs) should not be too difficult -- provided that you have some experience working with low level plotter protocols.


1.5. Why do I get only black output on my color plotter?

Assuming that you do use a GPL format file which can handle color (most of them do), this problem is very likely due to missing colors in the plot file itself. In order to generate color plots, you have to use a plot file device which supports colors, such as the devices GPL/GPR plotfile (color...).


1.6. Why do the small letters look so ugly on my plot?

If very small characters (or node boxes) look ugly on the output plot, this is probably due to using a plot file that was generated with a low resolution plot device. E.g. most Emtool devices use coordinates with a resolution limited to 1024x780. While this is okay for screen displays, it is unusable for plotting on paper. The standard GPR/GPL devices use an internal resolution of 16384x12480. This corresponds to a resolution of 0.07 mm on a world format A0 sheet, which should be sufficient in most cases. Should, however, this resolution still be too coarse for some very special applications, it is possible to prepare a special plot device and a format file which use an extended resolution of 65536x49920.


 

1.7. Why do I get the error message ``File not in Fortran format!''?

EMME/2 plot file are generated using unformatted Fortran write statements. On most machines this results in binary output files which contain a 4-byte record length indicator before and after each record. By default, GPL checks for these record length indicators and then discards them, since they do not really contain plotting information. The error message ``File not in Fortran format!'' is displayed if the record length indicators are not consistent or absent. The latter can occur if the plot file is imported from a system which does not generate these indicators, or if the plot file has previously been processed by the utility e2plots, which removes the record structure. In this case, you must use the command line option -nofort to let GPL know that the file does not contains explicit record boundaries. (This question applies to both GPL and GPR.)


 

1.8. Why do I get the error messages ``unused: 2''?

This is a similar problem to the previous one, just the other way around: If GPL is called with the option -nofort to process a plot file that does contain Fortran type record boundaries, it will try to interpret the record boundaries as plot information. This leads, on the one hand, to small "glitches" in the plot output itself, and also typically to a long series of error messages of the type ``unused: 2''. The "2" here corresponds to the second byte of the length indicator for records with a length of 512 bytes (which is a full length record).

In general, the message ``unused: X'' indicates that a character with ASCII X was found in the input which is not meaningful as a graphic command. Thus, this message also is generated in other situations where the contents of the plot file is invalid. (This question applies to both GPL and GPR.)


1.9. How can I use GPL to generate plots without the EMME/2 frame?

With GPR, special size indicators (such as M-F, L-F, ...) are available to output EMME/2 plots without the standard plot frame. GPL does not really generate the plots itself, but only transforms the contents of the plot file into some specific graphic command language such as HPGL, PostScript, DXF, .... Thus, if and how omitting the frame from the output is possible depends on the particular command language and --if it can be done- requires the modification of the corresponding GPL format file.

In PostScript, the frame is most easily removed by "over-painting" it with white at the very end of the plot, i.e. by putting the corresponding PostScript commands into the end page string. In addition, it is usually also desirable to scale the remaining part of the plot to use also the space normally used for plotting the frame. An example of such a modified GPL format file is postscnf.gpl, which can be found in the archive section of this Web site.

For HPGL/2, the easiest solution is to use the command IW (Input Window) to set the clipping region in such a way that the frame portion of the plot is eliminated. To do this, simply replace the substring

SC0,16384,0,12480,1;

in the start page string by the new string

SC0,14400,800,11600,1;IW0,800,14400,11600;

This should do the trick. An example GPL format file which uses this approach is hpgl2nf.gpl, which can be found in the archive section of this Web site.


2. Configuring and Using GPR


2.1. What is GPR?

GPR is a general utility program which can transform EMME/2 plot files to a large class of bitmap based printer languages and graphic protocols. The details of the transformation are defined in a GPR format file. These format files usually have the file name extension .gpr and are located in the emme2/lib directory. The output of GPR can either be routed directly to the plotting device or can be saved in a disk file (which can get extremely large!).


2.2. What protocols are supported by GPR?

The current version of GPR is provided with format files for the following graphic printer protocols:

HP-PCL
Hewlett-Packard's Printer Command language (used in the Laserjet and Deskjet printer series, also emulated by many other laser printers)
Brother HL8
Brother's variant on HP-PCL used with HL-8 series laser printers (same as HP-PCL except for proprietary data compression format)
Epson-LQ
Epson's LQ protocol for 24 pin matrix printers (still supported by many laser and inkjet printers)
Epson 9-pin
Originally introduced with Epson's MX series of 9-pin printer (a de-facto standard still emulated by many current printers, but offers only very low resolutions)

If your printer emulates more than one of the above protocols, use the one that appears first in the list, this will give the best possible results. If your printer is not compatible with any of the above protocols, try the following:


2.3. Where is GPR documented?

A fully detailed documentation of GPR can be found in section 7.4 of the EMME/2 User's Manual.


2.4. Can I write my own GPR format file?

In principle, yes. However, this can be a rather tricky task, since the contents of the GPR format file is tied into the GPR program internals much more than is the case with GPL. Thus, do not expect to be able to write yourself a GPR format file for an entirely new type of printers, as it is quite likely that one would also need to make changes to the GPR program itself. However, the contents and layout of a GPR format file is fully documented in section 7.4.4 of the EMME/2 User's Manual (Customizing GPR). Thus, it is quite possible (and not too difficult if you know how your printer works) to modify existing GPR format files, to change things like:


2.5. How can I produce plots with thicker lines?

At EMME/2 Users Conferences I have often seen presentation using overhead foils generated with GPR that were barely readable, since the lines of the plots were too thin for projection.

By default, GPR generates vectors with a width of 1 pixel (which is about 0.01 mm for 300 dpi laser printers). While this is ideal to produce plots with many small details for inclusion into reports, it is not ideal for projection. In this case, the command line option -w can be used to increase the width of the vectors drawn. E.g. using ``gpr -w 2 ...'' will produce double width vectors. Personally, I found that on 300dpi HP Laserjet/Deskjet printers the best results for overhead foils are obtained using a width of 3 or 4.


2.6. Why do I get the error message ``File not in Fortran format!''?

See question 1.7. in the GPL section.


2.7. Why do I get the error messages ``unused: 2''?

See question 1.8. in the GPL section.



Back to: Top - FAQ Index - EMME/2 Support Center Home Page


Copyright 1996. Heinz Spiess, EMME/2 Support Center, CH-2558 Aegerten, Switzerland
Last changed on Fri May 31 16:30:27 MET DST 1996