
Electrochemical Instruments
To: Worldwide Distribution................................Date: March 19, 1996
From: Bill Eggers
Subject: Getting EG&G plots into Word Processing Programs
We have been asked many times over the past few years to provide a utility to get our software plots into Word Processing programs. In addition, since GSS has stopped the development of new drivers for printers, we have added pressure to get our plot output to different kinds of plotters.
We have a fairly easy modification that can be performed with the software that will allow the printing of our plots by different printers using the word processing programs most people use.
This modification will produce an HPGL file containing an image of the plot you are trying to pn'nt out. This HPGL file can be easily imported into almost any word processing program we know of and can then be outputted to a printer or a plotter. In fact, doing it this way may produce better quality plots than could be obtainable from the software alone.
The attached two pages describes the procedure for implementing this feature. It is fairly easy to follow.
Very often it is desirable to produce a report or publication with plots from the EG&G PARC M270, M271, M352, or M398 software. This is actually fairly simple to do.
Many modern word processors (we are familiar with Word(TM) for Windows ) allow you to import or include a file that is written in 'HPGL' or 'HPL. This is the standard plotting language used by Hewlett Packard for their plotters. The trick, then, is to have the EG&G PARC software send the plotting commands to a file rather than to the plotter. This is easily done when the software is installed properly.
When the software is installed (or reconfigured) using the INSTALL disk, a DOS Batch file is created. This batch file loads the drivers for the input and output devices you have specified, and then calls the desired program (M270, M271, M352, or M398.) These batch files are ECHEM.BAT, COOL.BAT, CORR.BAT, and EIS.BAT. If you wish to generate HPGL files, you should install (or reconfigure) the program using the INSTALL program on the INSTALL / DRIVERS disk.
When the INSTALL program prompts you for the display, mouse, printer, and GPIB card select the one that is appropriate for your installation. However, when the INSTALL program asks for the plotter type, you should respond with 3, the choice for HPGL compatible, even if you do not have a plotter! The program then asks for the plotter type. We have found the default'7440' to be satisfactory. Finally, you are asked for the communications port to which it is attached. The default of COM1 is satisfactory.
The INSTALL program will generate a batch file that will look very similar to the ECHEM.BAT shown below.
cd\M270
set m270file=M270\
set plotter=hpglpltr
set hpglpltr=COM1
if not (%1)==( ) set hpglpltr=%l
c:\parc\drivers
m270
c:\parc\drivers /a
set plotter=
set hpglpltr=
set m270file=
cd\
The batch files for M271 (COOL.BAT), M352 (CORR.BAT), or M398 (EIS.BAT) will look similar, except that 271 (or 352, or 398) will be substituted for 270.
If the program is initiated normally, by typing ECHEM then the plotter output will go COM1 as it would normally.
If, however, if you begin the program by typing........ECHEM diskfile
then each plot will be directed to a different file, starting with diskfile.000 with the extension being incremented with each "page" of output. It is the line if not (%1)==() set hpglpltr=%l which performs this magic.
To import these flies into Word for Windows, you must rename the file. Word uses the extension of the file to determine its type. The extension must be hgl for Word to interpret it as an HPGL file. So, if you began the M270 software by typing
ECHEM PLOTS
then the files will be called PLOTS.000, PLOTS.001, etc. You should rename the files to something unique, but ending with the extension hgl. in our example, you might choose to rename them PLOTS000.hgl, PLOTS001.hgl, etc. Be sure the 8 character file name is unique for each file!
The plots can then be placed in a Word document by simply selecting insert followed by Picture. Select hgl as the file type from the list of supported graphics formats. When you give Word the file name PL0T001.hgl, it will convert that plot from the hgl format, and draw it in your document. This document may be printed out on any supported printer.