You are currently reviewing an older revision of this page.
Anthony Cox from Red Box Design shares this article with us. It was originally created as an internal document to address some specific plotting issues when dealing with HPGL/2 plotfiles and contains some terrific reference material. Thanks Anthony!!
Anthony Cox from Red Box Design shares this article with us. It is based on an internal document that's part of their CAD Manual and address some specific plotting issues when dealing with HPGL/2 plotfiles. It's chalk full of terrific reference material and Anthony is willing to share the HTML version complete with illustrations upon request. Please contact him directly via email if you'd like a copy. His email address can be found at the bottom of the page. Thanks Anthony!! HPGL vs HPGL/2 HPGL was developed by Hewlett Packard to drive its family of pen plotters. Most commands are vector oriented - pick up the pen, put down the pen, move here, move there. Very few complex commands are part of HPGL since the original plotters did not include powerful CPUs. HPGL/2 was developed as a successor to HPGL to support many more advanced features that could be off loaded to plotters with powerful CPU's and large amounts of memory. HPGL/2 also includes quite a lot of raster controls and commands since most modern plotters are actually raster devices. This includes embedded pen definitions - up to 256 since a raster device can never run out of pens..., fill patterns, screened vectors, clipping windows, data transformation and the like. Why do we use it? MicroStation allows us a great deal of flexibility on how the final print will appear by using an editable list of preferences found in a Plot Driver File. This file allows us to decide what happens to colours, line styles, pen weights and so forth. Three main advantages of using HPGL2:
To Determine the "Unique Naming Convention" (UNC) path to the Plotter: To establish the "address" of the printer/plotter, we first need to understand how it is attached to your computer. There are three ways this can be done:
Create a Batch File to Automate the Printing Process: First we must override the default Windows settings for viewing files, so depending upon which Windows Operating System you have, navigate to either the View Options or Folder Options dialog and ensure that the following are set:
Changing the Shortcut Icon: You will notice that the shortcut to your new file is a generic icon and it would be rather nice to change it to something of meaning. The HP logo is something most users are familiar with so we'll change the shortcut to use this highly recognized logo. Icon images are traditionally found in files with the extension of ICO and will be located somewhere on your HP Product Installation CD. You'll need to copy the ICO file containing the logo you want to the same location as your newly created batch file and rename it to something like HP.ICO. To alter the icon of the shortcut on your desktop, just do a Right-click > Properties and select Change Icon. You'll probably get a message saying the btch file contains no icons, which isn't a problem. Just click the OK and then the Browse button. Navigate to your folder and select the icon file. Your shortcut now has the icon associated with HP Products.
"Send To" a Plotter: One nice function of Windows is the right click Send To option and by adding a shortcut to the batch file it is possible to select a file and "Send To" the plotter by just doing a right-click! Again, the following depends upon the version of Windows your running...but you need to get to navigate the to Send To folder for your Windows Profile. Once it's located, all you need to do is place a shortcut to the batch file in that folder. The shortcut will now be availalbe when you do a right-click on any file.
Plot Files from MicroStation: As noted before, the way MicroStation translates the information from the screen to the plotter can be highly customised with the use of a plot driver file. Bentley has supplied a series of drivers for various plotters including HP plotters. This has led to some confusion since the majority of those are simply HPGL2 settings that can be applied to *any* HPGL2 device - including LaserJet 4MV printers.
Contents of a MicroStation HPGL2 Plotfile: It's possible to examine a plotfile and obtain useful information from it - primarily the size of the plot. As noted earlier the plotfile has three parts:
The following informationn are the typical commands found in an HPGL2 plotfile. The commands are normally separated by a semicolon and for clarity each command has been isolated onto a single line. Note that the actual graphical information has also been removed. %0BBP1 Enters the HP-GL/2 mode, BP=Begin Plot "test.dgn" File name INPS33240,21328 Initialise the plotter and establish the plot size, in plotter resolution units, as 33240,21328. QL100 Quality Level = 100 which is the best setting. SC Scale NP64 Number of Pens = 64 TR0 Tranpareny mode where 0 is Off and 1 is On. LA1,1,2,2,3,1.500000 Unknown PW0.025000 Pen Width in plotter resolution units = 0.025 mm PE Unknown PC0,255,255,255 Pen Colour 0 = RGB Values of 255,255,255 PC1,0,0,0 to PC63,200,0,0 Remaining pens IW0,1072,33239,21327 Input Window - possibly used for margins. PE Actual graphical information PUSP0 Unknown PG Advance full page Determine the Page Size from a Plotfile: The most useful information that can be determined from a plot file is the page size. If you multiply the INPS values by the PW you get the size of the output in millimetres. 33240x0.025=831mm, 22400x0,.025=560mm which is an A1 sheet in landscape mode allowing for 10mm margins on the long side and 17mm margins on the short side.
AskInga Article #104