-- a3plot.mac -- original data from Alan Liddle, Root Solutions Ltd. - 12 Dec 1997 -- Modified and customised for CCL by Mike Nelson July 1998 --This plotting process first extracts some sheet size and window information from the current sheet. --The sheet is then saved into a temporary area with a temporary name. A unique macro is them written --appropriate to the platform. the plot driver (i$plot) is then called with this macro (a$plot) to --plot the sheet (the temporory saved copy). after the plotting is completed the temporory sheet --and the macro are deleted --On the unix machines the plotting is directed to a preselected plotting device (our DesignJet 2500) --On the NT machines the user is able to chose the output ech tab errpau off errbel off errmes off mx getglobal mxe plist1 as proj$x let w1 = (winds$[1]) let w2 = (winds$[3]) let w3 = (winds$[2]) let w4 = (winds$[4]) if (OS$TYP .eq. 'win_nt') then --commands are unique to the NT version write ' ' write 'select A3 paper, Portrait format, & optional tray' write ' ' mx getglobal plotter_products winplot as prod let i$plot = ( prod;"/plot/run/driver.exe -app") else --commands are unique to the UNIX machines write ' ' write 'This will plot the current window on the QMS A3 printer' write ' ' let i$plot = ("/medusa/medng31/medplot_postscript/plot/run/driver") endif --these commands common to all platforms let a$plot = "@vtmp$mdplot_@vuid.mac" -- to make unique for each use let fil$nm = "@vtmp$mdplot_@vuid.she" -- to make unique for each user open write output write output '@@e-ech tab errpau off' if (OS$TYP .eq. 'win_nt') then --commands are unique to the NT version write output 'dricom "init1"' else --commands unique to the UNIX machines using HPGL write output 'plotter plot.dat sin spool "lpr -Pmedqms_a3 -slh %f%;/bin/sleep 5;/bin/rm %f%"' endif --commands common to all platforms write output 'area x 420 y 297' write output 'autoscale 290 410 ' -- squeeze the plot onto the sheet and avoid edge loss write output ' php 1 thick 0.15 col 0 0 0' write output ' php 2 thick 0.35 col 0 0 0' write output ' php 3 thick 0.7 col 0 0 0' write output ' phpsel man' write output ' lgp 0/4 php 1' write output ' lgp 5/9 php 2' write output ' lgp 10/14 php 3' if (OS$TYP .eq. 'win_nt') then --commands are unique to the NT version write output ' dricom "pendef 1 0.15 0 0 0"' write output ' dricom "pendef 2 0.35 0 0 0"' write output ' dricom "pendef 3 0.7 0 0 0"' endif --commands common to all platforms --write output ' dricom "gap 0 0"' write output 'thksim off' write output 'rot auto' write output 'she @vfil$nm' write output 'project @vproj$x' write output 'code 1' write output 'scale 1' write output 'arcfac @varcct$' write output 'WINDOW @vw1 @vw2 @vw3 @vw4 @vunits$' write output 'lay 19/30 off' -- turn off the construction lines write output 'write "Plotting please wait"' write output 'plot' write output 'quit' write output ' ' close output sav tmp @vfil$nm let b$plot = ("@@e- macro ";a$plot) mx stack (i$plot) (b$plot) delete (fil$nm) delete (a$plot) write 'Back in 2d drafting' errpau on quit