-- a0plot.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 --Extract the current window and capture the settings for use later 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 let shex = (sheet$[1]) let shey = (sheet$[2]) write ' ' write 'This @ttci sheet should be plotted to the Drawing Office DesignJet 2500 plotter' write ' ' write 'select the same size of paper as the sheet size and' write 'landscape format except for A0 which must be portrait to avoid disapointment' 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 @ttci sheet will be plotted to the Drawing Office DesignJet 2500 plotter' write ' ' let i$plot = ("/medusa/medng31/medplot_hpgl2/plot/run/driver") endif --these commands common to all platforms let a$plot = "@vtmp$mdplot_@vuid.mac"-- to make macro unique for each user let fil$nm = "@vtmp$mdplot_@vuid.she" -- to make sheet 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"' write output 'area x 1500.0 y 941.0' else --commands unique to the UNIX machines using HPGL write output 'plotter hpgl2.hp negy spool "lpr -Pdo2500 -slh %f%;/bin/sleep 25;/bin/rm %f%"' write output 'area x 1500.0 y 941.0' endif --commands common to all platforms write output ' php 1 thick 0.20 col 0 0 0' write output ' php 2 thick 0.50 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"' else --commands unique to the UNIX machines using HPGL write output 'dricom "penw 1 0.2"' write output 'dricom "penw 2 0.5"' write output 'dricom "penw 3 0.7"' write output 'dricom "penc 1 0 0 0"' write output 'dricom "penc 2 0 0 0"' write output 'dricom "penc 3 0 0 0"' write output 'DRICOM "ORIGIN HARDCLIP"' write output 'DRICOM "P1P2 0 0 0 0"' write output 'DRICOM "INIT"' write output 'DRICOM "MODEL 5"' write output 'DRICOM "TECHNICAL ON"' write output 'DRICOM "PALETTE OFF"' write output 'DRICOM "DUAL ON"' write output 'DRICOM "PCL ON"' write output 'DRICOM "JOINT NONE"' write output 'DRICOM "ENDS NONE"' write output 'DRICOM "CUTTER ON"' write output 'DRICOM "OFFLINE NONE"' write output 'DRICOM "GAP 0 0"' endif --commands common to all platforms 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) errpau on write 'Back in 2d drafting' quit