DGplot Version 0.07 By John (the Amiga Kid) Robertson DGplot is copyright (c) 1990 by John Dillard Robertson, 28 Pinckney St. #4, Greenville, SC 29601, (803) 271-1459 (voice), but may be freely distributed as long as no profit is made from its distribution or sale without my written permission. This program is 'FreeWare'. Included Support files: PrtDef (directory) ... printer driver files arp.library ... AmigaDOS Replacement Project library DGplot ... DGplot program executable file DGplot.doc ... Documentation for DGplot (you are looking at it) FastLib ... Fbasic support library required to run programs compiled with the Fbasic compiler. NULL ... An empty file for PIPE: reads Plans-configuration ... HPGL configuration file for "Plans" shareware CAD program. RaceCar.D ... Sample HPGL file. "D" size drawing. SuperPlot.HP7550 ... Sample HPGL file. "HP7550" size drawing. ------ What in the heck is DGplot? ------ DGplot, or "darn good plot" is a program which turns your Amiga computer and parallel port dot matrix printer into an extremely high resolution Hewlett-Packard ® pen plotter. This makes your printer a suitable (and economical) hard copy device for computer aided design programs, some spreadsheet programs, and data graphing programs. You will probably be amazed when you see the resolution that your dot matrix printer really has. DGplot output in FINAL quality will look much better than a screen dump. DGplot reads (and understands) a useful subset of HPGL commands. HPGL is an acronym for "Hewlett Packard Graphics Language", which is a language used to tell a pen plotter how to draw a picture. HPGL files are ASCII files, so you can type them to the CLI window if you are curious. HPGL has become a pseudo-standard plotter language in the computer industry, and is supported by all CAD programs. DGplot has been tested with: - `Plans' shareware CAD program (you must have the proper "plans-configuration" file which is supplied with this program) - `X-CAD designer' commercial CAD program - `SuperPlot' data graphing program (on this disk) DGplot should work fine with Aegis Draw (and all variants), IntroCad, and most other CAD programs. ------ How do I set up DGplot? ------ Required Files: directory file ---------- ---------- C: DGplot LIBS: arp.library S: FastLib DGprinter (one of the included printer drivers renamed) DGplot is designed to support just about any dot matrix printer on the market. To accomplish this, DGplot must have a special printer driver file in your S: directory, named "DGprinter". The DGplot printer driver is NOT the same as a preferences printer driver, so don't intermix them. DGplot printer drivers are compatible with most IntroCad ® printer drivers. If you look in the PrtDef directory you will find the names of many printers. After you select the appropriate one, copy it to the S: directory, and rename it "DGprinter". If you need to try several printer drivers, you can specify the printer driver on the command line (See Power Users section). Copy the program file, "DGplot", into your C: directory, or somewhere in your assigned search path. You must also copy the file "FastLib" into your S: directory, and the "arp.library" into your LIBS: directory. If you are booting off of "Ultra_Bench", both files will already be there. Please note: Nothing you can set in Preferences will have any effect on DGplot. ------ How do I use DGplot? ------ To use DGplot, simply type: DGplot HPGLfilename into a CLI window where `HPGLfilename' is the name of an HPGL file. You will be prompted with the following: Select a drawing size A (8 x 10.5) 1000 units/inch B (10.5 x 16.5) 1000 units/inch C (16.25 x 21.25) 1000 units/inch D (21 x 33) 1000 units/inch E (33 x 43) 1000 units/inch HP7475 (7.8 x 10.1) 1021 units/inch HP7550 (7.7 x 10) 1016 units/inch USER Specify (? x ?) 1000 units/inch (ESC) (CR) to abort ? Reply with "A","B","C"..., or hit the ESC key and then RETURN to abort. DGplot will not alter the scaling of your drawing in any way, so make sure you choose the appropriate size for the drawing you would like to plot. If you choose the "USER" selection you will be prompted for the desired width and height of the drawing. A 1/2" border is assumed. after making a valid choice, you will be prompted next with something like this: Specify drawing quality QUICK DRAFT FINAL (ESC) (CR) to abort ? Reply by typing in one of the choices (upper or lower case doesn't matter). If you have trouble, view the printer driver, which is an ASCII file. If DGplot finds the selected entry in the printer driver, and the HPGL file is where you said that it was, you should see DGplot counting the kilobytes read from the file. DGplot is now reading the file and building the internal vector lists. If you wish to abort the file read, just activate the CLI window that DGplot is running from, and press CTRL-C simultaneously. After DGplot finishes reading the HPGL file it will begin printing immediately. You will see a status line printed which tell you how many strips and how many rows to go. 1 row = 1 printer head height, and 1 strip is one 8" wide portion of the drawing. If you wish to abort the printing, just activate the CLI window that DGplot is running from, and press CTRL-C simultaneously. If DGplot appears to be doing nothing, check to see that your printer is turned on, and "ON LINE". If the drawing size you selected is 8" or more in its shortest dimension (including the border), the printer will print out several strips with alignment marks. The strips should be separated and joined along the sides, with the alignment marks on top of each other. Strip #1 Strip #2 ______________________________ ______________________________ | | | | | alignment mark---> + | | + <--- alignment mark | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |............................| |............................| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | + | | + | |____________________________| |____________________________| | Tear here and join to | ^ | + strip #1 | | | | | | | | | | | | | | | | | | | | | |<--------------- | | |............................| | | | | | | | | | | | | | | | | | | | + | |____________________________| Since dot matrix printers can't print all of the way to the left edge of the paper, you will have to trim about 1/8" off of the left side of all strips after first. DGplot gives you 1/4" of overlap between strips. The best way to join the strips is to lay them on a large flat surface properly aligned, place a straight edge on the junction, and cut with a razor knife. This will give an exact edge with no overlap necessary. ------ Power Users ------ For all you power users out there, DGplot accepts any number of HPGL filenames on the command line, or any ARP wildcard pattern (The GADS command line parser is used). You may also specify the size, width, height, print quality, and printer driver on the command line. If you specify a size other than "USER", the width and height arguments will be ignored. If you omit a necessary specification, you will be prompted for it. Here is a fully specified example: DGplot t:*.plt -S user -W 10.0 -H 7.49 -Q draft -P PrtDrv/Epson-FX or DGplot t:*.plt -S hp7550 -Q draft -P PrtDrv/Epson-FX where * is a wildcard character. If you use the command line options to specify size and print quality, DGplot can be run from script files. ------ Reading from the PIPE: device ------ HPGL files can be very large, and have little value in themselves. This makes them a good candidate for the PIPE: device. The PIPE: device was distributed on WorkBench 1.3, and on Ultra_Bench. The PIPE: device is a 4K buffer that appears to a program as a file. Using the PIPE: will eliminate the need to save the HPGL file to disk, and it will speed up the whole process of printing output. To use the PIPE: with DGplot you must open a CLI window and make sure that the PIPE: is mounted by typing: mount PIPE: This will mount the PIPE: device if it has not already been mounted. Now you should invoke DGplot with a valid PIPE: for the HPGLfilename. For example: DGplot PIPE:A -S user -W 30 -H 20 -Q final The "PIPE:A" specification may be any string up to 30 characters as long as it starts out with "PIPE:". After you hit RETURN, DGplot should report that it is reading PIPE:A, and should not be counting up. At this point, DGplot is waiting for some program to write to "PIPE:A". Now go to your CAD program, or any program that outputs HPGL and plot your drawing by selecting the HPGL plotter option, and save output to "PIPE:A". Now, if you flip back to the WorkBench screen, you should see the CLI window with DGplot running in it counting up the Kbytes read. When your CAD program indicates that it has finished saving the HPGL plot file, DGplot may or may not start printing. If it does not, it is still waiting for an `end of file' condition from the PIPE:. To supply this I have included a file named "NULL", which is empty. Open a second CLI window (it is important that it is not the same CLI window as DGplot is running from), and type: type null to PIPE:A This will send the `end of file' signal to DGplot, and it should start printing immediately. ------ Reference ------ HPGL commands currently supported with DGplot are: AA - the Arc Absolute instruction CI - the Circle instruction DF - the Default instruction IN - the Initialize instruction PA - the Plot Absolute instruction PD - the Pen Down instruction PR - the Plot Relative instruction PU - the Pen Up instruction RO - the Rotate Coordinate System instruction LT - the Line Type instruction All commands that are in an HPGL file and are not supported by DGplot will simply be ignored. Since I am interested in making DGplot useful to as many people as possible, I will add support for commands that you request. ------ Intentions ------ I do not wish to support all HPGL commands, since the size of the code and memory requirements would be very large. DGplot and all vector lists currently take up about 120K of memory, depending on the size of the input file. This makes it feasible to run DGplot while you are still running your CAD program. ------ What's the Catch? ------ If you find a bug, I would appreciate it if you would tell me about it. It is very helpful if you can provide the HPGL file that made DGplot barf. My address and phone number are: John D. Robertson 28 Pinckney St. #4 Greenville, SC 29601 (803) 271-1459 Any donations will be gleefully accepted, and donaters will recieve a reply in the mail. Donations will provide incentive for future public domain programs. ------ Future Plans ------ Thanks in part to my faithful alpha testers, I plan to do the following: - Support a command which is not in the Hewlett Packard Graphics Language, but would be useful for making printed circuit boards. The command will be "LW", for Line Width, and will have one argument. The argument will specify the line width in thousandths of an inch. To use this feature you simply assign the LW command instead of the SP command in your plotter setup file for your CAD program. This will make each color of line on the screen represent a different width of line on the hard copy. (Thanks Jerry!) - Support color (I need to get at least one request for this). All suggestions will be appreciated and considered. Thank you and enjoy DGplot! ------ Release Notes ------ Version 0.03 (1/28/90) Initial release. Does not support HPGL "LT" command, so can't do line types. Only accepts one HPGL file on the command line. Version 0.06 (2/25/90) Now supports "LT" command. Supports ARP command line options with unlimited filenames, wild cards, and complete drawing specification from key words. Requires the presence of the "arp.library" in the "LIBS:" directory. Added "USER" drawing size where the user specifies the width and height of the drawing. User may now break (ctrl-C) at any time during reading phase or printing phase. Version 0.07 (3/3/90) DGplot now prints out the available print quality entries from the printer driver that has been specified, so you can see all available choices. If you incompletely specify either the size or print quality by using fewer characters than shown, DGplot will look for the first character for character match for what you have specified. (Thanks Bernie!)