Rules™ can import HPGL files with varying degrees of success. The following section describes how to use the HPGL import function to recover machine output files.

Rules should import your Rules HPGL output files with 100% accuracy since we know entirely what to expect. Text positions and sizes tend to vary just slightly due to multiple fraction and Metric to English conversions that occur in “round tripping” a design from Rules to HPGL and back into Rules. Follow the instructions for normally importing a file and choose the HPGL option to import an HPGL file that was generated by Rules. Rules sample maker, laser and rotary laser output can be recovered using this method in the event that the generating file was lost, corrupted or accidentally deleted.

To import HPGL files generated by systems other than Rules, follow these guidelines to get successful results. HPGL should never be used as a method of file transfer. The specification is not fully supported in Rules and Rules cannot produce consistent results. If you do find that for some reason you need to recover a file generated by another system, Rules will attempt to import it. First try the normal import method. Rules will ignore all commands except those that actually produce geometry or text. Once the importer has run through the file, the geometry will be visible in the drawing area of your file and you will see the following dialog box that reports unusual and unsupported commands and displays any comments in the HPGL file.

AlphaCorr Rules and SteelRules imports box-making or display HPGL files, reporting any unusual or unsupported issues in a dialog box.

This HPGL Import report shows a rotary laser output file generated by another system. You can see that there are a number of items that were either comments or unsupported, or unexpected commands. Most of these are unimportant when importing but if you get some unusual geometry take note of the contents of this report.

If the first attempt to import the file produces undesirable results, open the file in a text editor such as Simple Text, Wordpad or Notepad. HPGL files are plain text files and can be edited in any text editor. Rules expects to see a scale factor of 1:1. Any file with a scale factor of other than 1:1 will have to be manually scaled after importing. Rules expects to see single line HPGL commands. In other words, each HPGL command should be followed by its parameters and the command terminator “;” followed by the ASCII decimal number 3 as a line terminator. HPGL does not require this single line command format. Some machines dump their output in a single line. In case of such a file, you will have to use a text editor to put a return in the file after each command string. An easy way to do this is to open the file in a text editor that has a search and replace function. Search for the semicolon “;” character and replace it with “;” and a return character. If you don’t have an editor that can do this and are on service contract, email the file to us at AlphaCorr™ support and we will convert it for you. Alternatively, you can manually enter the returns and save the file. The first two lines of the file hopefully look like this:

IN; - the standard entry point command PU0,0; - a reference to send the machine to 0,0

Make the changes to the file as described above and try importing the file again. If you still have problems getting usable geometry from the file, review the HPGL Import report and eliminate the issues that appear in the window. Each issue is tagged with the offending line number, the type of issue, and the value of the offending command. The biggest obstacle to a successful import that is the return character must be present after each “;” command terminator. Look for PU (pen up) or PD (pen down) commands in the report. If you see lines that have those commands in them, the file probably has line breaks or a lack of line breaks that Rules does not understand. Contact AlphaCorr if you need serious help recovering an HPGL file. We can dissect it and remove the problem for you with a little time. If you are on service contract and do this infrequently the service is free. Otherwise we’ll send you a quote for the services.