; PRPLOT.LSP by Brian Carslon ; Network PRPlot utility ; This macro must be added to your ACAD.lsp ; You must have a Novell printjob configuration called "CAD" in order for this ; macro to run. (device = HP, NT, NFF, NA, Bytestream, Banner optional) ; The "CAPTURE" timeout option is irrelevent since the job goes direct to Queue. ; I have one HP Laserjet IID and two queues CAD & HP, since CAD files take a ; while, I setup the seperate queues and gave HP a higher priority. ; for local printers you could change the "NPRINT" line to COPY fname LPT?: ; ; By the way, this macro also asks for next dwg name, then ends after prplot ; and loads next file for you. (Defun S::STARTUP () ;use S::STARTUP to redefine PRPLOT (command "UNDEFINE" "END") (command "UNDEFINE" "PRPLOT") (princ) ) (setq startup nil) (Defun C:PRPLOT () (setvar "cmdecho" 0) (prompt "\nSaving file...... ") (command "save" "") (getppdata) ;find out next dwg info (setq fname (getvar "dwgname") ;setup filename to U: (users directory) lg (strlen fname)) (if (= ":" (substr fname 2 1)) (setq fname (strcat "U" (substr fname 2 (- lg 1)))) (setq fname (strcat "U:" fname)) ) (setq file (open "U:PRPLOT.SCR" "w")) (write-line ".PRPLOT" file) (write-line "D" file) ; plot display (write-line "Y" file) ; change parameters (write-line "Y" file) ; plot to file (write-line "I" file) ; units (write-line "0,0" file) ; origin (write-line "MAX" file) ; paper size (write-line "Y" file) ; rotate 90 degrees (write-line "N" file) ; no hide (write-line "F" file) ; scale to fit (write-line fname file) ; plot file name (write-line "" file) ; return to continue (write-line (strcat "NPRINT " (strcat fname ".LST") " JOB=CAD") file) (write-line (strcat "del " fname ".lst") file) ;delete plot file from disk (if (= endfile "Y") (progn (write-line "QUIT" file) (write-line "Y" file) (if (/= newfile "") (progn (write-line action file) (write-line newfile file) ) (write-line "0" file) ) ) (write-line "GRAPHSCR" file) ) (close file) (command "SCRIPT" "U:PRPLOT") (princ) ) (defun getppdata () (initget 1 "Y N") (setq endfile (strcase (getkword "\nEND after Printer Plot? "))) (if (= endfile "Y") (progn (setq newfile (strcase (getstring "\nNext Drawing: "))) (if (= nil (findfile (strcat newfile ".dwg"))) (setq action "1") (setq action "2")) ) ) )