;;;Batch plotting Dialog application. Creates a script for batch operations. ;;;Script only check box omits plot instructions from script for scripting ;;;anything without plotting. Requires DOSLIB 2K ;;; ;;; ;;; ;;; ;;;Added ability to have DWG name (w/o ext) written for script-only output filename ;;;If (EQ ins_fname 1), DWG name will be written between pre & post script files. ;;; ;;; 1-16-2004: Fixed prob. in funct. (setone) where long filename ;;; (< 48 chars w/o path) caused infinite loop. ;;; ;;;The following is an example of code necessary for plotting all layouts: ;;;(foreach n (layoutlist) ;;;(COMMAND "-PLOT" "Yes" n "TIFF Version 6 (CCITT G4 2D Compression)" "34X22 300dpi (10200.00 x 6600.00 Pixels)" "Landscape" "No" "Window" (getvar"limmin") (getvar"limmax") "300=1" "Center" "Y" "TIFF 300dpi.ctb" "Y" "N" "Y" "N") ;;;(COMMAND (strcat(substr(STRCAT(getvar"dwgprefix")"Plots\\34x22\\"(getvar"dwgname"))1(-(strlen(STRCAT(getvar"dwgprefix")"Plots\\34x22\\"(getvar"dwgname")))4))"-" n) "Y" "Y") ;;;) ;;; ;;;> Author: Henry C. Francis ;;;> 425 N. Ashe St. ;;;> Southern Pines, NC 28387 ;;;> http://paracadd.com ;;;> All rights reserved. ;;; ;;;> COPYRIGHT: 3-13-97 ;;;> EDITED: 12-20-2006 ;;; (DEFUN bplot2k_error (msg /) (SETQ *error* old_bp2kerror) (PRINC msg) (TERM_DIALOG) (PRINC) ) ;_ end of defun (DEFUN c:bplot2k (/) ;;; (SETVAR "TILEMODE" 0) (SETQ old_bp2kerror *error*) (SETQ *error* bplot2k_error) (SETQ princprfx (IF debug_princs "[DEBUG] " "" ) ;_ end of IF ) ;_ end of SETQ (IF princdebugstrs nil (LOAD "princdebugstrs" "\nFile PRINCDEBUGSTRS.LSP not loaded! " ) ;_ end of LOAD ) ;_ end of IF (princdebugstrs (LIST "Begin execution of BPLOT2K function.\n") ) ;_ end of princdebugstrs (SETQ dirini T caldir nil selndi nil ) ;_ end of setq (SETQ old_bp2kecho (GETVAR "CMDECHO")) (SETVAR "CMDECHO" 0) (SETQ old_bp2kexpert (GETVAR "expert")) (IF browser_help nil (LOAD "browser_help" "\nFile BROWSER_HELP not loaded!") ) ;_ end of IF (COND ;if DOSLib is already loaded, return true ((NOT (NULL DOS_ABOUT)) (IF (>= (SUBSTR (GETVAR "ACADVER") 1 2) "15") T (SETQ abort_bplot2k T) ) ;_ end of IF ) ;if AutoCAD Release 12, ((= (ATOI (SUBSTR (GETVAR "acadver") 1 2)) 12) (SETQ abort_bplot2k T) ;;; (XLOAD "doslib12") ) ;if AutoCAD Release 13, ((= (ATOI (SUBSTR (GETVAR "acadver") 1 2)) 13) (SETQ abort_bplot2k T) ;;; (XLOAD "doslib13" nil) ) ;if AutoCAD Release 14, ((= (ATOI (SUBSTR (GETVAR "acadver") 1 2)) 14) (SETQ abort_bplot2k T) ;;; (ARXLOAD "doslib14") ) ;if AutoCAD Release 2000, ((AND (= (ATOI (SUBSTR (GETVAR "acadver") 1 2)) 15) (NOT DOS_VER) ) ;_ end of and (ARXLOAD "doslib15") ) ((AND (= (ATOI (SUBSTR (GETVAR "acadver") 1 2)) 16) (NOT DOS_VER) ) ;_ end of and (ARXLOAD "doslib16") ) ;default message ;;; (T ;;; (SETQ abort_bplot2k T) ;;; ) ) ;_ end of cond (IF abort_bplot2k (ALERT " BPLOT2K is designed for\nAutoCAD version 2000i or newer only!\n\n ***ABORTING***" ) ;_ end of ALERT (PROGN (IF ins_fname nil (SETQ ins_fname "0") ) ;_ end of IF ; (setq orgdrv (dos_drive)) (SETQ orgdrv (SUBSTR (GETVAR "dwgprefix") 1 2)) (IF debug_doslib (PRINC "\nDOS_1 ") ) (DOS_DRIVE orgdrv) (IF debug_doslib (PRINC "\nDOS_1 ") ) ; (setq orgdir (dos_pwdir)) (SETQ orgdir (GETVAR "dwgprefix")) (IF debug_doslib (PRINC "\nDOS_2 ") ) (DOS_CHDIR (SUBSTR orgdir 4)) (IF debug_doslib (PRINC "\nDOS_2 ") ) (SETQ dirstr (STRCAT "Selection path: " (GETVAR "dwgprefix")) ;(DOS_PWDIR) olddir dirstr ) ;_ end of setq ;;; (PRINC "\ndirstr = ") ;;; (PRINC dirstr) ;;; (PRINC) (IF debug_doslib (PRINC "\nDOS_3 ") ) (SETQ d_flst (DOS_DIR (STRCAT (GETVAR "dwgprefix") "*.dwg"))) (SETQ ddirs (DOS_SUBDIR (GETVAR "dwgprefix"))) (IF debug_doslib (PRINC "\nDOS_3 ") ) (IF (EQ (SUBSTR dirstr (1- (STRLEN dirstr))) ":\\") (IF ddirs nil (SETQ ddirs (LIST "")) ) ;_ end of if (IF ddirs (IF (MEMBER ".." ddirs) nil (SETQ ddirs (APPEND (LIST "..") ddirs)) ) ;_ end of if (SETQ ddirs (LIST "..")) ) ;_ end of if ) ;_ end of if (IF debug_doslib (PRINC "\nDOS_4 ") ) (SETQ ddrvs (DOS_DRIVES)) (IF debug_doslib (PRINC "\nDOS_4 ") ) (IF (MEMBER "A:" ddrvs) (SETQ ddrvs (CDR (MEMBER "A:" ddrvs))) ) ;_ end of if (IF (MEMBER "B:" ddrvs) (SETQ ddrvs (CDR (MEMBER "B:" ddrvs))) ) ;_ end of if (loadpages) (SETQ num (LOAD_DIALOG "bplot2k")) (NEW_DIALOG "bplot2k" num) (SET_TILE "dirtxt" dirstr) (drvlst) (START_LIST "file_drv") (MAPCAR 'ADD_LIST avdrvs) (END_LIST) (setfdrv) (IF jstscr (PROGN (SET_TILE "jst_scr" "1") (SET_TILE "selnum" "0 Drawings selected for script only:") (SET_TILE "Preplot" "Pre-name:") (SET_TILE "Postplot" "Post-name:") (SET_TILE "ins_fname" ins_fname) (MODE_TILE "plotrs" 1) (MODE_TILE "pages" 1) (MODE_TILE "file_drv" 1) (MODE_TILE "dblplt" 1) (MODE_TILE "allayplt" 0) (MODE_TILE "etrf_scr" 0) (MODE_TILE "forcedim0" 0) (MODE_TILE "out_to" 1) (MODE_TILE "plttobox" 1) (MODE_TILE "ins_fname" 0) ) ;_ end of progn (PROGN (SET_TILE "jst_scr" "0") (SET_TILE "selnum" "0 Drawings selected for plotting:") (SET_TILE "Preplot" "Preplot:") (SET_TILE "Postplot" "Postplot:") (MODE_TILE "plotrs" 0) (MODE_TILE "pages" 0) (MODE_TILE "file_drv" 0) (MODE_TILE "dblplt" 0) (MODE_TILE "allayplt" 0) (MODE_TILE "etrf_scr" 0) (MODE_TILE "forcedim0" 0) (MODE_TILE "out_to" 0) (MODE_TILE "plttobox" 0) (MODE_TILE "ins_fname" 1) ) ;_ end of progn ) ;_ end of if (IF prestr (SET_TILE "pltpre" prestr) ) ;_ end of if (IF pststr (SET_TILE "pltpst" pststr) ) ;_ end of if (IF dblplt (SET_TILE "dblplt" dblplt) (PROGN (SETQ dblplt "0") (SET_TILE "dblplt" dblplt) ) ;_ end of PROGN ) ;_ end of IF (IF allayplt (SET_TILE "allayplt" allayplt) (PROGN (SETQ allayplt "0") (SET_TILE "allayplt" allayplt) ) ;_ end of PROGN ) ;_ end of IF (IF etrf_scr (SET_TILE "etrf_scr" etrf_scr) (PROGN (SETQ etrf_scr "0") (SET_TILE "etrf_scr" etrf_scr) ) ;_ end of PROGN ) ;_ end of IF (IF forcedim0 (SET_TILE "forcedim0" forcedim0) (PROGN (SETQ forcedim0 "0") (SET_TILE "forcedim0" forcedim0) ) ;_ end of PROGN ) ;_ end of IF ;;; (IF savdwg ;;; (SET_TILE "savdwg" savdwg) (SET_TILE "savdwg" "1") ;;; ) ;_ end of if (IF qitend (SET_TILE "qitend" qitend) ) ;_ end of if (IF out_to (SET_TILE "out_to" out_to) (PROGN (SETQ out_to "Fileout") (SET_TILE "out_to" out_to) ) ;_ end of PROGN ) ;_ end of if (setout) (SETQ curdwg (GETVAR "dwgname")) (SETQ curpfx (GETVAR "dwgprefix")) (IF debug_doslib (PRINC "\nDOS_5 ") ) (SETQ spltpat (DOS_SPLITPATH curdwg)) (IF debug_doslib (PRINC "\nDOS_5 ") ) (IF dos_win (IF (EQ (dos_win) "WINNT") (SETQ nt_true T) (SETQ nt_true nil) ) ;_ end of if (IF DOS_VER (IF (EQ (DOS_VER) "Windows NT Workstation 4.0") (SETQ nt_true T) (SETQ nt_true nil) ) ;_ end of if (SETQ nt_true nil) ) ;_ end of if ) ;_ end of if (IF nt_true (IF (= (LENGTH spltpat) 4) (SETQ curdwg (STRCAT (NTH 2 spltpat) (NTH 3 spltpat))) ) ;_ end of if (IF (EQ (SUBSTR curdwg 1 2) (SUBSTR curpfx 1 2)) (SETQ curdwg (STRCAT (SUBSTR curdwg (1+ (STRLEN curpfx))) (IF (WCMATCH (STRCASE curdwg) "*.DWG") "" ".DWG" ) ;_ end of IF ) ;_ end of STRCAT ) ;_ end of SETQ (SETQ curdwg (STRCAT curdwg (IF (WCMATCH (STRCASE curdwg) "*.DWG") "" ".DWG" ) ;_ end of IF ) ;_ end of STRCAT ) ;_ end of SETQ ) ;_ end of if ) ;_ end of if (IF (OR (EQ curdwg "UNNAMED.DWG") (EQ curdwg "DRAWING.DWG")) nil (IF (MEMBER curdwg d_flst) (SET_TILE "fedit" curdwg) ) ;_ end of if ) ;_ end of if (IF (AND page1 (MEMBER page1 psl_lst)) (PROGN (SETQ pagedx (ITOA (- (LENGTH psl_lst) (LENGTH (MEMBER page1 psl_lst)) ) ;_ end of - ) ;_ end of ITOA ) ;_ end of SETQ (SET_TILE "pages" pagedx) ) ;_ end of PROGN ) ;_ end of IF (MODE_TILE "fedit" 2) (ACTION_TILE "jst_scr" "(setfdrv)(setscr)") (ACTION_TILE "etrf_scr" "(SETQ etrf_scr (get_tile \"etrf_scr\"))" ) ;_ end of ACTION_TILE (ACTION_TILE "dirs" "(setq caldir $reason)(dirlst)") (ACTION_TILE "fedit" "(setq pltndx NIL)(if(eq $reason 2)nil(progn(bplot2k_key_search nil)(chkfil)))" ;Was (bplot2k_key_search out_filn) ) ;_ end of action_tile (ACTION_TILE "files" "(chkfil)") (ACTION_TILE "selall" "(set_tile\"fedit\"\"*\")(bplot2k_key_search out_filn)(chkfil)" ) ;_ end of action_tile (ACTION_TILE "clear" "(setq pltlst nil)(setq selndi \"\")(setrem)(set_tile\"files\"\"\")(set_tile\"error\"\"\")" ;did include (set_tile\"fedit\"\"\") ) ;_ end of action_tile (ACTION_TILE "plotrs" "(setq pltrdx (get_tile\"plotrs\"))(setplt)" ) ;_ end of ACTION_TILE (ACTION_TILE "pages" "(setq pagedx (get_tile\"pages\") page1 (NTH (ATOI pagedx) psl_lst))" ) ;_ end of ACTION_TILE (ACTION_TILE "file_drv" "(SETQ fildrv(NTH(READ(GET_TILE\"file_drv\"))avdrvs))(setfdrv)") (ACTION_TILE "dblplt" "(setdbls)") (ACTION_TILE "allayplt" "(setallay)") (ACTION_TILE "forcedim0" "(setdim0)") ;;; (ACTION_TILE "pltscl" "(setscl)") ;;; (ACTION_TILE "pltare" "(setare)") ;;; (ACTION_TILE "hidplt" "(sethid)") (ACTION_TILE "savdwg" "(setsav)") (ACTION_TILE "qitend" "(setqit)") (ACTION_TILE "out_to" "(setout)") (ACTION_TILE "remove" "(setrem)") (ACTION_TILE "reverse" "(revsel)") (ACTION_TILE "filsel" "(setq selndi (get_tile \"filsel\"))(setone)" ) ;_ end of action_tile (ACTION_TILE "savelst" "(savepltlst)") (ACTION_TILE "restorelst" "(restorepltlst)") (ACTION_TILE "ins_fname" "(SETQ ins_fname (GET_TILE \"ins_fname\"))" ) ;_ end of ACTION_TILE (ACTION_TILE "accept" "(pltsup)(setq prvplst pltlst pltndx(get_tile\"files\"))(dclst)(done_dialog)" ) ;_ end of action_tile (ACTION_TILE "cancel" "(setq prvplst pltlst pltlst nil filst nil)(rstdir)(done_dialog)" ) ;_ end of action_tile (ACTION_TILE "help" "(browser_help \"Bplot2K\")" ) ;_ end of action_tile (dirlst) (chkfil) (START_LIST "pages") (MAPCAR 'ADD_LIST psl_lst) (END_LIST) (setpage) (pltrlst) (IF prvplst (PROGN (SET_TILE "selnum" (STRCAT (ITOA (LENGTH prvplst)) " Drawings selected for plotting:" ) ;_ end of strcat ) ;_ end of set_tile (SETQ pltlst prvplst) (START_LIST "filsel") (MAPCAR 'ADD_LIST pltlst) (END_LIST) ) ;_ end of PROGN ) ;_ end of IF (START_DIALOG) (SETQ errtxt nil) (IF debug_doslib (PROGN (PRINC "\nallayplt = ") (PRINC allayplt) (PRINC) ) ;_ end of PROGN ) ;_ end of IF (IF pltlst (bplots2k pltlst plotr page1 fildrv savdwg qitend orgdir out_to forcedim0) ;_ end of bplots2k ;_ end of bplots2k ;_ end of bplots2k ;_ end of bplots2k ;_ end of bplots2k ;_ end of bplots2k (PROGN (IF pltndx (PROGN (IF jstscr (PRINC "\nBatch Script Only dialog cancelled. ") (PRINC "\nBatch Plot dialog cancelled. ") ) ;_ end of if (SETQ pltndx nil) ) ;_ end of progn (IF jstscr (PRINC "\nNo files selected for script only. ") (PRINC "\nNo files selected for plotting. ") ) ;_ end of if ) ;_ end of if (rstdir) ) ;_ end of progn ) ;_ end of if (UNLOAD_DIALOG num) ) ;_ end of PROGN ) ;_ end of IF (IF old_bp2kecho (SETVAR "CMDECHO" old_bp2kecho) ) ;_ end of IF (IF old_bp2kexpert (SETVAR "expert" old_bp2kexpert) ) ;_ end of IF (princdebugstrs (LIST "End execution of BPLOT2K function.\n") ) ;_ end of princdebugstrs (SETQ princprfx (COND ((AND princprfx (WCMATCH princprfx "`[DEBUG`] *")) (SUBSTR princprfx 1 (- (STRLEN princprfx) 2)) ) (debug_princs "[DEBUG] ") (T "") ) ;_ end of COND ) ;_ end of SETQ (PRINC) (SETQ *error* old_bp2kerror) (PRINC) ) ;_ end of defun ;;;******************************************************************** (DEFUN savepltlst () (SETQ edfil (GETFILED "Save Batch Script Drawing List" (GETVAR "dwgprefix") "bsl" 1 ) ;_ end of getfiled ) ;_ end of setq (IF edfil (PROGN (SETQ opedfil (OPEN edfil "w")) (PRIN1 pltlst opedfil) (CLOSE opedfil) ) ;_ end of progn ) ;_ end of if (PRINC) ) ;_ end of DEFUN ;;;******************************************************************** (DEFUN restorepltlst () (SETQ edfil (GETFILED "Restore Batch Script Drawing List" (GETVAR "dwgprefix") "bsl" 8 ) ;_ end of getfiled ) ;_ end of setq (IF edfil (PROGN (SETQ opedfil (OPEN edfil "r")) (SETQ pltlst (READ (READ-LINE opedfil))) (CLOSE opedfil) (SETQ nfpltlst nil) (FOREACH n pltlst (IF (FINDFILE n) nil (SETQ nfpltlst (APPEND nfpltlst (LIST n))) ) ;_ end of if ) ;_ end of foreach ;;; (princ "\npltlst = ") ;;; (princ (length pltlst)) ;;; (princ "\nnfpltlst = ") ;;; (princ (length nfpltlst)) ;;; (princ) (IF nfpltlst (PROGN (IF (EQ (LENGTH pltlst) (LENGTH nfpltlst)) (PROGN (SET_TILE "error" "None of the specified files can be found!" ) ;_ end of SET_TILE (PRINC "\nNone of the specified files can be found.\nMake sure they exist on the specified path before running the script." ) ;_ end of PRINC ) ;_ end of PROGN (PROGN (SET_TILE "error" "Some of the specified files cannot be found!" ) ;_ end of SET_TILE (PRINC "\nSome of the specified files cannot be found.\nMake sure they exist on the specified path before running the script." ) ;_ end of PRINC ) ;_ end of PROGN ) ;_ end of IF (PRINC "\n\n\tThe following files cannot be found:\n") (FOREACH n nfpltlst (PRINC "\n") (PRINC n) ) ;_ end of foreach (PRINC "\n") (PRINC) ) ;_ end of PROGN ) ;_ end of if (SET_TILE "selnum" (STRCAT (ITOA (LENGTH pltlst)) (IF jstscr " Drawings selected for script only:" " Drawings selected for plotting:" ) ;_ end of IF ) ;_ end of strcat ) ;_ end of set_tile (START_LIST "filsel") (MAPCAR 'ADD_LIST pltlst) (END_LIST) ) ;_ end of progn ) ;_ end of if (PRINC) ) ;_ end of DEFUN ;;;******************************************************************** (DEFUN revsel () (SETQ pltlst (REVERSE pltlst)) (START_LIST "filsel") (MAPCAR 'ADD_LIST pltlst) (END_LIST) (SETQ prvplst pltlst) ) ;_ end of defun ;;;******************************************************************** (DEFUN drvlst () (IF debug_doslib (PRINC "\nDOS_6 ") ) (SETQ avdrvs (DOS_DRIVES)) (IF debug_doslib (PRINC "\nDOS_6 ") ) (IF (MEMBER "A:" avdrvs) (SETQ avdrvs (CDR (MEMBER "A:" avdrvs))) ) ;_ end of if (IF (MEMBER "B:" avdrvs) (SETQ avdrvs (CDR (MEMBER "B:" avdrvs))) ) ;_ end of if (SETQ avdrvs (APPEND (LIST "with DWG") avdrvs)) (IF avdrvs (PROGN (START_LIST "file_drv") (MAPCAR 'ADD_LIST avdrvs) (END_LIST) ) ;_ end of PROGN ) ;_ end of IF (PRINC) ) ;_ end of DEFUN ;;;******************************************************************** (DEFUN dirlst () (IF (EQ caldir 4) (PROGN (SETQ chgdir (GET_TILE "dirs")) (IF debug_doslib (PRINC "\nDOS_7 ") ) (IF (EQ (SUBSTR (NTH (ATOI chgdir) dirs) 1 1) "<") (DOS_DRIVE (SUBSTR (NTH (ATOI chgdir) dirs) 2 2)) (DOS_CHDIR (NTH (ATOI chgdir) dirs)) ) ;_ end of if (SETQ dirstr (STRCAT "Selection path: " (DOS_PWDIR))) (IF debug_doslib (PRINC "\nDOS_7 ") ) (PRINC "\ndirstr (2) = ") (PRINC dirstr) (PRINC) (SET_TILE "dirtxt" dirstr) (IF (/= olddir dirstr) (PROGN (IF debug_doslib (PRINC "\nDOS_8 ") ) (SETQ ddirs (DOS_SUBDIR) ddrvs (DOS_DRIVES) d_flst (DOS_DIR "*.dwg") ) ;_ end of setq (IF debug_doslib (PRINC "\nDOS_8 ") ) (IF (MEMBER "A:" ddrvs) (SETQ ddrvs (CDR (MEMBER "A:" ddrvs))) ) ;_ end of if (IF (MEMBER "B:" ddrvs) (SETQ ddrvs (CDR (MEMBER "B:" ddrvs))) ) ;_ end of if (IF d_flst nil (SETQ d_flst (LIST "")) ) ;_ end of if (IF (EQ (SUBSTR dirstr (1- (STRLEN dirstr))) ":\\") (IF ddirs nil (SETQ ddirs (LIST "")) ) ;_ end of if (IF ddirs (IF (MEMBER ".." ddirs) nil (SETQ ddirs (APPEND (LIST "..") ddirs)) ) ;_ end of if (SETQ ddirs (LIST "..")) ) ;_ end of if ) ;_ end of if ) ;_ end of progn ) ;_ end of if (SETQ dirini T) ) ;_ end of progn ) ;_ end of if (IF dirini (PROGN (SETQ dirs (ACAD_STRLSORT ddirs)) (SETQ drvs (ACAD_STRLSORT ddrvs)) (FOREACH n drvs (SETQ drvs (SUBST (STRCAT "<" n ">") n drvs ) ;_ end of subst ) ;_ end of setq ) ;_ end of foreach (IF d_flst (PROGN (IF (MEMBER curdwg d_flst) nil (IF (EQ curdwg "UNNAMED.DWG") nil ) ;_ end of if ) ;_ end of if (SETQ filst (ACAD_STRLSORT d_flst)) ) ;_ end of progn (IF (EQ curdwg "UNNAMED.DWG") nil (SETQ filst (LIST curdwg)) ) ;_ end of if ) ;_ end of if (START_LIST "files") (MAPCAR 'ADD_LIST filst) (END_LIST) (SETQ olddir dirstr) (SETQ dirs (APPEND dirs drvs)) (START_LIST "dirs") (MAPCAR 'ADD_LIST dirs) (END_LIST) (SETQ dirini nil) ) ;_ end of progn ) ;_ end of if ) ;_ end of defun ;;;******************************************************************** (DEFUN pltrlst () (IF debug_doslib (PRINC "\nDOS_9 ") ) (SETQ pwdir_sav (DOS_SPLITPATH (DOS_PWDIR))) (IF debug_doslib (PRINC "\nDOS_9 ") ) (SETQ acad_locn (FINDFILE "acad.exe")) (IF acad_locn (PROGN (IF debug_doslib (PRINC "\nDOS_10 ") ) (SETQ split_locn (DOS_SPLITPATH acad_locn)) (DOS_DRIVE (CAR split_locn)) (DOS_CHDIR (CADR split_locn)) (COND ((EQ (SUBSTR (GETVAR "ACADVER") 1 2) "15") (SETQ plotrs (DOS_DIR "plotters\\*.pc3")) ) ((EQ (SUBSTR (GETVAR "ACADVER") 1 2) "16") (SETQ plotrs (COND ((DOS_DIR (STRCAT "C:\\Documents and Settings\\" (DOS_USERNAME) ".HUASPN\\Application Data\\Autodesk\\Autodesk Land Desktop 2004\\R16.0\\enu\\Plotters\\*.pc3" ) ;_ end of STRCAT ) ;_ end of DOS_DIR ) ((DOS_DIR (STRCAT "C:\\Documents and Settings\\" (DOS_USERNAME) "\\Application Data\\Autodesk\\Autodesk Land Desktop 2004\\R16.0\\enu\\Plotters\\*.pc3" ) ;_ end of STRCAT ) ;_ end of DOS_DIR ) ) ;_ end of COND plotstyles (COND ((DOS_DIR (STRCAT "C:\\Documents and Settings\\" (DOS_USERNAME) ".HUASPN\\Application Data\\Autodesk\\Autodesk Land Desktop 2004\\R16.0\\enu\\Plot Styles\\*.?tb" ) ;_ end of STRCAT ) ;_ end of DOS_DIR ) ((DOS_DIR (STRCAT "C:\\Documents and Settings\\" (DOS_USERNAME) "\\Application Data\\Autodesk\\Autodesk Land Desktop 2004\\R16.0\\enu\\Plot Styles\\*.?tb" ) ;_ end of STRCAT ) ;_ end of DOS_DIR ) ) ;_ end of COND ) ;_ end of SETQ ) ) ;_ end of COND (SETQ plt_lst nil) (FOREACH n plotrs (SETQ plt_lst (APPEND plt_lst (LIST (SUBSTR n 1 (- (STRLEN n) 4))) ) ;_ end of APPEND ) ;_ end of SETQ ) ;_ end of foreach (DOS_DRIVE (SUBSTR (GETVAR "dwgprefix") 1 2)) (DOS_CHDIR (SUBSTR (GETVAR "dwgprefix") 3)) (START_LIST "plotrs") (MAPCAR 'ADD_LIST plt_lst) (END_LIST) ;;; (START_LIST "pages") ;;; (MAPCAR 'ADD_LIST psl_lst) ;;; (END_LIST) (setplt) ;;; (setpage) (IF debug_doslib (PRINC "\nDOS_10 ") ) (PRINC) ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of defun ;;;******************************************************************** (DEFUN pltsup () (SETQ prestr (GET_TILE "pltpre")) (SETQ pststr (GET_TILE "pltpst")) (IF (NOT jstscr) (PROGN (setplt) (IF psl_lst (SETQ page1 (NTH (ATOI (GET_TILE "pages")) psl_lst)) (SETQ page1 nil) ) ;_ end of IF (setfdrv) (setsav) (setqit) ) ;_ end of progn ) ;_ end of if ) ;_ end of defun ;;;******************************************************************** (DEFUN setplt () (IF pltrdx (SET_TILE "plotrs" pltrdx) (PROGN (COND ((SETQ remlst (MEMBER "TIFF Version 6 (CCITT G4 2D Compression)" plt_lst ) ;_ end of MEMBER ) ;_ end of SETQ (SETQ pltrdx (ITOA (- (LENGTH plt_lst) (LENGTH remlst)))) ) ((SETQ remlst (MEMBER "XEROX" plt_lst)) (SETQ pltrdx (ITOA (- (LENGTH plt_lst) (LENGTH remlst)))) ) ((SETQ remlst (MEMBER "8825" plt_lst)) (SETQ pltrdx (ITOA (- (LENGTH plt_lst) (LENGTH remlst)))) ) (T (SETQ pltrdx "0")) ) ;_ end of COND (SET_TILE "plotrs" pltrdx) ) ;_ end of PROGN ) ;_ end of if (IF (AND plt_lst (EQ (TYPE plt_lst) 'LIST) pltrdx (EQ (TYPE pltrdx) 'str) (EQ (TYPE (READ pltrdx)) 'int) ) ;_ end of AND (SETQ plotr (NTH (ATOI pltrdx) plt_lst)) ) ;_ end of IF ) ;_ end of defun ;;;******************************************************************** (DEFUN setfdrv () ;;; (IF fdrvndx (IF (AND fildrv (MEMBER fildrv avdrvs)) (PROGN (SETQ drvlst_len (LENGTH avdrvs)) (SETQ fildrv_len (LENGTH (MEMBER fildrv avdrvs))) (SETQ fdrvndx (ITOA (- drvlst_len fildrv_len))) (SET_TILE "file_drv" fdrvndx) ) ;_ end of PROGN (PROGN (IF (AND (MEMBER "H:" avdrvs) (WCMATCH (STRCASE (GETVAR "dwgname")) "DRAWING*.DWG") ) ;_ end of AND (PROGN (SETQ fdrvndx (ITOA (- (LENGTH avdrvs) (LENGTH (MEMBER "H:" avdrvs))) ) ;_ end of ITOA ) ;_ end of SETQ (SET_TILE "file_drv" fdrvndx) ) (IF (MEMBER (SUBSTR (GETVAR "dwgprefix") 1 2) avdrvs) (SETQ fdrvndx (ITOA (- (LENGTH avdrvs) (LENGTH (MEMBER (SUBSTR (GETVAR "dwgprefix") 1 2) avdrvs ) ;_ end of MEMBER ) ;_ end of length ) ;_ end of - ) ;_ end of ITOA ) ;_ end of SETQ ) ;_ end of IF ) ;_ end of IF ) ;_ end of PROGN ) ;_ end of IF ;;; (IF (MEMBER (substr(getvar"dwgprefix")1 2) avdrvs) ;;; (SETQ fdrvndx (ITOA(1-(LENGTH (MEMBER (substr(getvar"dwgprefix")1 2) (REVERSE avdrvs)))))) ;;; (SETQ fdrvndx "0") ;;; ) ;;; ) ;_ end of if (SETQ fildrv (NTH (ATOI fdrvndx) avdrvs)) (IF fdrvndx NIL (SETQ fdrvndx "1") ) ;_ end of IF (SET_TILE "file_drv" fdrvndx) ) ;_ end of defun ;;;******************************************************************** (DEFUN setpage () ;;; (PRINC "\n\n\t\tpagedx = ") ;;; (princ pagedx) ;;; (princ "\n\t\tlength of psl_lst = ") ;;; (princ (length psl_lst)) ;;; (princ "\n\t\t(CADR split_fp) = ") ;;; (princ (CADR split_fp)) ;;; (princ) (IF debug_doslib (PRINC "\nDOS_11 ") ) (SETQ dwg_split_fp (DOS_SPLITPATH (GETVAR "dwgprefix"))) (IF debug_doslib (PRINC "\nDOS_11 ") ) (IF (AND pagedx (<= (READ pagedx) (1- (LENGTH psl_lst))) (EQ (TYPE pagedx) 'str) ) ;_ end of AND (SET_TILE "pages" pagedx) (COND ((AND (OR (EQ (SUBSTR (GETVAR "dwgprefix") 4 2) "CL") (EQ (SUBSTR (GETVAR "dwgprefix") 4 2) "FB") ) ;_ end of OR (MEMBER "TIFF 40X28 600dpi PS" (REVERSE psl_lst)) ) ;_ end of AND (SETQ pagedx (ITOA (1- (LENGTH (MEMBER "TIFF 40X28 600dpi PS" (REVERSE psl_lst)) ) ;_ end of LENGTH ) ;_ end of 1- ) ;_ end of ITOA ) ;_ end of SETQ (SET_TILE "pages" pagedx) ) ((AND (OR (EQ (SUBSTR (GETVAR "dwgprefix") 4 2) "CL") (EQ (SUBSTR (GETVAR "dwgprefix") 4 2) "FB") ) ;_ end of OR (MEMBER "TIFF 40X28 400dpi PS" (REVERSE psl_lst)) ) ;_ end of AND (SETQ pagedx (ITOA (1- (LENGTH (MEMBER "TIFF 40X28 400dpi PS" (REVERSE psl_lst)) ) ;_ end of LENGTH ) ;_ end of 1- ) ;_ end of ITOA ) ;_ end of SETQ (SET_TILE "pages" pagedx) ) ((MEMBER (STRCAT "TIFF " (ITOA (FIX (CAR (GETVAR "LIMMAX")))) "X" (ITOA (FIX (CADR (GETVAR "LIMMAX")))) " 300dpi PS" ) ;_ end of STRCAT (REVERSE psl_lst) ) ;_ end of MEMBER (SETQ pagedx (ITOA (1- (LENGTH (MEMBER (STRCAT "TIFF " (ITOA (FIX (CAR (GETVAR "LIMMAX")))) "X" (ITOA (FIX (CADR (GETVAR "LIMMAX")))) " 300dpi PS" ) ;_ end of STRCAT (REVERSE psl_lst) ) ;_ end of MEMBER ) ;_ end of LENGTH ) ;_ end of 1- ) ;_ end of ITOA ) ;_ end of SETQ (SET_TILE "pages" pagedx) ) ((MEMBER (STRCAT "TIFF " (ITOA (FIX (CAR (GETVAR "LIMMAX")))) "X" (ITOA (FIX (CADR (GETVAR "LIMMAX")))) " 400dpi PS" ) ;_ end of STRCAT (REVERSE psl_lst) ) ;_ end of MEMBER (SETQ pagedx (ITOA (1- (LENGTH (MEMBER (STRCAT "TIFF " (ITOA (FIX (CAR (GETVAR "LIMMAX")))) "X" (ITOA (FIX (CADR (GETVAR "LIMMAX")))) " 400dpi PS" ) ;_ end of STRCAT (REVERSE psl_lst) ) ;_ end of MEMBER ) ;_ end of LENGTH ) ;_ end of 1- ) ;_ end of ITOA ) ;_ end of SETQ (SET_TILE "pages" pagedx) ) ((MEMBER (STRCAT "TIFF " (ITOA (FIX (CAR (GETVAR "LIMMAX")))) "X" (ITOA (FIX (CADR (GETVAR "LIMMAX")))) " 600dpi PS" ) ;_ end of STRCAT (REVERSE psl_lst) ) ;_ end of MEMBER (SETQ pagedx (ITOA (1- (LENGTH (MEMBER (STRCAT "TIFF " (ITOA (FIX (CAR (GETVAR "LIMMAX")))) "X" (ITOA (FIX (CADR (GETVAR "LIMMAX")))) " 600dpi PS" ) ;_ end of STRCAT (REVERSE psl_lst) ) ;_ end of MEMBER ) ;_ end of LENGTH ) ;_ end of 1- ) ;_ end of ITOA ) ;_ end of SETQ (SET_TILE "pages" pagedx) ) ((MEMBER "TIFF 34X22 300dpi PS" (REVERSE psl_lst)) (SETQ pagedx (ITOA (1- (LENGTH (MEMBER "TIFF 34X22 300dpi PS" (REVERSE psl_lst)) ) ;_ end of LENGTH ) ;_ end of 1- ) ;_ end of ITOA ) ;_ end of SETQ (SET_TILE "pages" pagedx) ) ((MEMBER "TIFF 34X22 400dpi PS" (REVERSE psl_lst)) (SETQ pagedx (ITOA (1- (LENGTH (MEMBER "TIFF 34X22 400dpi PS" (REVERSE psl_lst)) ) ;_ end of LENGTH ) ;_ end of 1- ) ;_ end of ITOA ) ;_ end of SETQ (SET_TILE "pages" pagedx) ) ((MEMBER "TIFF 34X22 400DPI" (REVERSE psl_lst)) (SETQ pagedx (ITOA (1- (LENGTH (MEMBER "TIFF 34X22 400DPI" (REVERSE psl_lst)) ) ;_ end of LENGTH ) ;_ end of 1- ) ;_ end of ITOA ) ;_ end of SETQ (SET_TILE "pages" pagedx) ) ((AND dwg_split_fp (OR (WCMATCH (CADR dwg_split_fp) "*\\1363\\*") (WCMATCH (CADR dwg_split_fp) "\\1363\\*") (WCMATCH (CADR dwg_split_fp) "\\1363\\") ) ;_ end of OR ) ;_ end of AND (IF (MEMBER "CMUD 36x24 SHEET" (REVERSE psl_lst)) (SETQ pagedx (ITOA (1- (LENGTH (MEMBER "CMUD 36x24 SHEET" (REVERSE psl_lst)) ) ;_ end of LENGTH ) ;_ end of 1- ) ;_ end of ITOA ) ;_ end of SETQ (SETQ pagedx "0") ) ;_ end of IF (SET_TILE "pages" pagedx) ) ((AND dwg_split_fp (OR (WCMATCH (CADR dwg_split_fp) "*\\10302\\*") (WCMATCH (CADR dwg_split_fp) "\\10302\\*") (WCMATCH (CADR dwg_split_fp) "\\10302\\") ) ;_ end of OR ) ;_ end of AND (IF (MEMBER "CHAR 36x24 SHEET" (REVERSE psl_lst)) (SETQ pagedx (ITOA (1- (LENGTH (MEMBER "CHAR 36x24 SHEET" (REVERSE psl_lst)) ) ;_ end of LENGTH ) ;_ end of 1- ) ;_ end of ITOA ) ;_ end of SETQ (SETQ pagedx "0") ) ;_ end of IF (SET_TILE "pages" pagedx) ) ((MEMBER "HUA 17X11" (REVERSE psl_lst)) (SETQ pagedx (ITOA (1- (LENGTH (MEMBER "HUA 17X11" (REVERSE psl_lst)))) ) ;_ end of ITOA ) ;_ end of SETQ (SET_TILE "pages" pagedx) ) (T (IF pagedx (SET_TILE "pages" pagedx) (PROGN (SETQ pagedx "0") (SET_TILE "pages" pagedx) ) ;_ end of PROGN ) ;_ end of IF ) ) ;_ end of COND ;;; (SET_TILE "pages" pagedx)) ;;; (T (SETQ pagedx "4");(ITOA (MIN 4 (1-(LENGTH psl_lst))))) ;;; (SET_TILE "pages" pagedx)) ;;; ) ;_ end of COND ) ;_ end of if (IF (< (READ pagedx) 0) (SETQ pagedx "0") ) ;_ end of IF (SETQ page1 (NTH (ATOI pagedx) psl_lst)) ;;; (PRINC "\n\n\t\tpagedx = ") ;;; (princ pagedx) ;;; (princ "\n\t\tlength of psl_lst = ") ;;; (princ (length psl_lst)) ;;; (princ "\n\t\t(CADR split_fp) = ") ;;; (princ (CADR split_fp)) ;;; (princ) ) ;_ end of defun ;;;******************************************************************** (DEFUN setdbls () (SETQ dblplt (GET_TILE "dblplt")) ) ;_ end of defun ;;;******************************************************************** (DEFUN setallay () (SETQ allayplt (GET_TILE "allayplt")) ) ;_ end of defun ;;;******************************************************************** (DEFUN setdim0 () (SETQ forcedim0 (GET_TILE "forcedim0")) ) ;_ end of defun ;;;******************************************************************** (DEFUN setscl () (SETQ pltscl (GET_TILE "pltscl")) ) ;_ end of defun ;;;******************************************************************** (DEFUN setare () (SETQ pltare (GET_TILE "pltare")) ) ;_ end of defun ;;;******************************************************************** (DEFUN sethid () (SETQ hidplt (GET_TILE "hidplt")) ) ;_ end of defun ;;;******************************************************************** (DEFUN setsav () (SETQ savdwg (GET_TILE "savdwg")) ) ;_ end of defun ;;;******************************************************************** (DEFUN setqit () (SETQ qitend (GET_TILE "qitend")) ) ;_ end of defun ;;;******************************************************************** (DEFUN setout () (SETQ out_to (GET_TILE "out_to")) (IF (OR (EQ out_to "Plotout") jstscr) (MODE_TILE "file_drv" 1) (MODE_TILE "file_drv" 0) ) ;_ end of IF ) ;_ end of defun ;;;******************************************************************** (DEFUN dclst (/ curndx prvndx) (IF debug_doslib (PRINC "\nDOS_12 ") ) (SETQ pltdir (DOS_PWDIR)) (IF debug_doslib (PRINC "\nDOS_12 ") ) (IF (AND pltndx filst) (PROGN (SETQ t_len (STRLEN pltndx) t_cnt 1 ndxlst nil prvndx nil ) ;_ end of setq (IF (<= t_cnt t_len) (SETQ ndxlst (LIST (READ (SUBSTR pltndx 1)))) ) ;_ end of if (WHILE (<= t_cnt t_len) (IF (EQ (SUBSTR pltndx (IF (EQ t_cnt 1) 1 (1- t_cnt) ) ;_ end of if 1 ) ;_ end of substr " " ) ;_ end of eq (PROGN (SETQ curndx (READ (SUBSTR pltndx t_cnt))) (IF (= curndx prvndx) nil (SETQ ndxlst (APPEND ndxlst (LIST (READ (SUBSTR pltndx t_cnt))) ) ;_ end of append ) ;_ end of setq ) ;_ end of if (SETQ t_cnt (1+ t_cnt)) (SETQ prvndx curndx) ) ;_ end of progn (SETQ t_cnt (1+ t_cnt)) ) ;_ end of if ) ;_ end of while (FOREACH n ndxlst (IF (< n (LENGTH filst)) ; added to fix undetermined error (IF pltlst (IF (MEMBER (STRCAT pltdir (NTH n filst)) pltlst) nil (SETQ pltlst (APPEND pltlst (LIST (STRCAT pltdir (NTH n filst))) ) ;_ end of append ) ;_ end of setq ) ;_ end of if (IF (MEMBER (STRCAT pltdir (NTH n filst)) pltlst) nil (SETQ pltlst (LIST (STRCAT pltdir (NTH n filst)))) ) ;_ end of if ) ;_ end of if ) ;_ end of IF ) ;_ end of foreach ) ;_ end of progn nil ) ;_ end of if ) ;_ end of defun ;;;******************************************************************** (DEFUN rstdir () (IF debug_doslib (PRINC "\nDOS_13 ") ) (IF (EQ (DOS_DRIVE) orgdrv) nil (DOS_DRIVE orgdrv) ) ;_ end of if (IF (EQ (DOS_PWDIR) orgdir) nil (DOS_CHDIR (SUBSTR orgdir 4)) ) ;_ end of if (IF debug_doslib (PRINC "\nDOS_13 ") ) ) ;_ end of defun ;;;******************************************************************** (DEFUN bplot2k_key_search (out_filn / m_indx ksopt) (IF out_filn (SETQ wc_str out_filn out_filn nil ) ;_ end of setq (SETQ wc_str (STRCASE (GET_TILE "fedit"))) ) ;_ end of IF (IF (> (STRLEN wc_str) 4) (IF (/= (STRCASE (SUBSTR wc_str (- (STRLEN wc_str) 3) 4)) ".DWG" ) ;_ end of /= (SETQ wc_str (STRCAT wc_str ".DWG")) nil ) ;_ end of if ) ;_ end of if (dclst) (FOREACH n d_flst (IF pltlst (IF (MEMBER (STRCAT pltdir n) pltlst) nil (IF (WCMATCH (STRCASE n) (STRCASE wc_str)) (SETQ pltlst (APPEND pltlst (LIST (STRCAT pltdir n)))) ) ;_ end of if ) ;_ end of if (IF (WCMATCH (STRCASE n) (STRCASE wc_str)) (SETQ pltlst (LIST (STRCAT pltdir n))) ) ;_ end of if ) ;_ end of if ) ;_ end of foreach ) ;_ end of defun ;;;******************************************************************** (DEFUN chkfil () (SETQ pltndx (GET_TILE "files")) (SETQ fnxlen (STRLEN pltndx)) (IF (= fnxlen 256) (PROGN (SET_TILE "error" "Selection exceeds maximum usable. Unselect some files." ) ;_ end of set_tile ) ;_ end of progn (PROGN (SET_TILE "error" "") ) ;_ end of progn ) ;_ end of if (dclst) (IF pltlst (PROGN (SETQ fsslen (LENGTH pltlst)) (SET_TILE "selnum" (STRCAT (ITOA fsslen) (IF jstscr " Drawings selected for script only:" " Drawings selected for plotting:" ) ;_ end of if ) ;_ end of strcat ) ;_ end of set_tile (START_LIST "filsel") (MAPCAR 'ADD_LIST pltlst) (END_LIST) ) ;_ end of progn (PROGN (SET_TILE "selnum" (IF jstscr "0 Drawings selected for script only:" "0 Drawings selected for plotting:" ) ;_ end of if ) ;_ end of set_tile (SET_TILE "choice" "") (START_LIST "filsel") (MAPCAR 'ADD_LIST (LIST "")) (END_LIST) ) ;_ end of progn ) ;_ end of if (PRINC) ) ;_ end of defun ;;;******************************************************************** (DEFUN setrem () (IF pltlst (PROGN (IF (AND selndi (/= selndi "")) (SETQ selndx (ATOI selndi)) (SETQ selndx nil) ) ;_ end of if (IF selndx (COND ((AND (< selndx (1- (LENGTH pltlst))) (> selndx 0)) (SETQ pltlst (APPEND (REVERSE (CDR (MEMBER (NTH selndx pltlst) (REVERSE pltlst))) ) ;_ end of reverse (CDR (MEMBER (NTH selndx pltlst) pltlst)) ) ;_ end of append ) ;_ end of setq ) ((EQ selndx 0) (SETQ pltlst (CDR pltlst)) ) ((EQ selndx (1- (LENGTH pltlst))) (SETQ pltlst (REVERSE (CDR (REVERSE pltlst)))) ) ) ;_ end of cond ) ;_ end of if (SETQ fsslen (LENGTH pltlst)) (IF (> selndx (1- fsslen)) (IF (AND (> fsslen 1) (> selndx 0)) (SETQ selndi (ITOA (1- selndx))) (SETQ selndi "0") ) ;_ end of if ) ;_ end of if (SET_TILE "selnum" (STRCAT (ITOA fsslen) (IF jstscr " Drawings selected for script only:" " Drawings selected for plotting:" ) ;_ end of if ) ;_ end of strcat ) ;_ end of set_tile (START_LIST "filsel") (MAPCAR 'ADD_LIST pltlst) (END_LIST) ) ;_ end of progn (PROGN (SET_TILE "selnum" (IF jstscr "0 Drawings selected for script only:" "0 Drawings selected for plotting:" ) ;_ end of if ) ;_ end of set_tile (START_LIST "filsel") (MAPCAR 'ADD_LIST (LIST "")) (END_LIST) ) ;_ end of progn ) ;_ end of if (IF pltlst (setone) ) ;_ end of if (PRINC) ) ;_ end of defun ;;;******************************************************************** (DEFUN setone () (IF (AND selndi (/= selndi "")) (PROGN (SETQ selndx (ATOI selndi)) (SETQ onefile (NTH selndx pltlst)) (IF (> (STRLEN onefile) 47) (PROGN (SETQ onetxt (STRCAT "..." (SUBSTR onefile (- (STRLEN onefile) 44)) ) ;_ end of strcat ) ;_ end of setq (IF (NOT (WCMATCH onetxt "*\\*")) (SETQ onetxt onefile) (PROGN (WHILE (/= (SUBSTR onetxt 1 1) "\\") (SETQ onetxt (SUBSTR onetxt 2)) ) ;_ end of while (SETQ onetxt (STRCAT (SUBSTR onefile 1 3) "..." onetxt)) ) ;_ end of PROGN ) ;_ end of IF (SET_TILE "choice" onetxt) ) ;_ end of progn (SET_TILE "choice" "") ) ;_ end of if (SET_TILE "filsel" selndi) ) ;_ end of progn ) ;_ end of if ) ;_ end of defun ;;;******************************************************************** (DEFUN setscr () (IF jstscr ;(eq (get_tile "jst_scr") 0) (PROGN (SETQ jstscr nil) (SET_TILE "files" "") (IF pltlst (SETQ fsslen (LENGTH pltlst)) (SETQ fsslen 0) ) ;_ end of if (SET_TILE "selnum" (STRCAT (ITOA fsslen) " Drawings selected for plotting:" ) ;_ end of strcat ) ;_ end of set_tile ;;; (SETQ ins_fname (GET_TILE "ins_fname")) (MODE_TILE "ins_fname" 1) (MODE_TILE "plotrs" 0) (MODE_TILE "pages" 0) (IF (OR (EQ out_to "Plotout") jstscr) (MODE_TILE "file_drv" 1) (MODE_TILE "file_drv" 0) ) ;_ end of IF (MODE_TILE "dblplt" 0) (MODE_TILE "allayplt" 0) (MODE_TILE "out_to" 0) (SET_TILE "Preplot" "Preplot:") (SET_TILE "Postplot" "Postplot:") ) ;_ end of progn (PROGN (SETQ jstscr T) (SET_TILE "files" "") (IF pltlst (SETQ fsslen (LENGTH pltlst)) (SETQ fsslen 0) ) ;_ end of if (SET_TILE "selnum" (STRCAT (ITOA fsslen) " Drawings selected for script only:" ) ;_ end of strcat ) ;_ end of set_tile ;;; (SETQ ins_fname (GET_TILE "ins_fname")) (MODE_TILE "ins_fname" 0) (MODE_TILE "plotrs" 1) (MODE_TILE "pages" 1) (MODE_TILE "file_drv" 1) (MODE_TILE "dblplt" 1) (MODE_TILE "allayplt" 0) (MODE_TILE "out_to" 1) (SET_TILE "Preplot" "Pre-name:") (SET_TILE "Postplot" "Post-name:") ) ;_ end of progn ) ;_ end of if ) ;_ end of defun ;;;******************************************************************** (DEFUN loadpages (/ pageanswers) (SETQ pages_old_expert (GETVAR "EXPERT")) (SETVAR "EXPERT" 5) (IF (SETQ pagefil (FINDFILE "pagesetup.lst")) ;Only page setups in this file AND in PAGESETUP.DWT are available (PROGN ;Add setups to PAGESETUP.LST AND PAGESETUPS.DWT to customize your setups (SETQ openpage (OPEN pagefil "r")) (SETQ setupslst nil) (WHILE (SETQ readpage (READ-LINE openpage)) (IF (/= readpage "") (SETQ setupslst (APPEND setupslst (LIST readpage))) ) ;_ end of IF ) ;_ end of WHILE (CLOSE openpage) ) ;_ end of PROGN (PRINC "\nFile PAGESETUP.LST not found! ") ) ;_ end of IF (IF (AND (FINDFILE "pagesetup.dwt") setupslst) (PROGN (SETQ alert_str "") (FOREACH n setupslst (SETQ alert_str (STRCAT alert_str n "\n")) ;;; (IF (getpages n) ;;; NIL (COMMAND "-psetupin" "pagesetup.dwt" n) ;;; ) ) ;_ end of FOREACH (SETQ alert_str (STRCAT "Currently available page setups:\n\n" alert_str "\n\nAdd/Edit page setups in template PAGESETUP.DWT\n\t\tAND\nAdd/Edit identical page setup names in text file PAGESETUP.LST" ) ;_ end of STRCAT ) ;_ end of SETQ (IF debug_doslib (PRINC "\nDOS_14 ") ) (IF (OR done_psalert (EQ (DOS_USERNAME) "CFrancis")) nil (ALERT alert_str) ) ;_ end of IF (IF debug_doslib (PRINC "\nDOS_14 ") ) (SETQ done_psalert T) (PRINC) ) ;_ end of progn (PRINC "\nFile PAGESETUP.DWT not found! ") ) ;_ end of if (SETQ psl_lst setupslst) (SETVAR "EXPERT" pages_old_expert) (PRINC) ) ;_ end of defun ;;;****************************************************************************** ;;;Checks to see if a page setup already exists in the drawing. (DEFUN getpages (name_to_check / pagesetuplst) (SETQ laylist (DICTSEARCH (NAMEDOBJDICT) "ACAD_LAYOUT")) (SETQ kickopnt (ASSOC 102 laylist)) (SETQ pltsets (ENTGET (CDADR (MEMBER kickopnt laylist)))) (SETQ assocnt 0) (WHILE (< assocnt (LENGTH pltsets)) (IF (EQ (CDR (NTH assocnt pltsets)) "ACAD_PLOTSETTINGS") (SETQ setupdict (ENTGET (CDR (NTH (1+ assocnt) pltsets)))) ) ;_ end of if (SETQ assocnt (1+ assocnt)) ) ;_ end of while (SETQ assocnt 0) (WHILE (< assocnt (LENGTH setupdict)) (COND ((EQ (CAR (NTH assocnt setupdict)) 3) (SETQ pagesetuplst (APPEND pagesetuplst (LIST (STRCASE (CDR (NTH assocnt setupdict)))) ) ;_ end of append ) ;_ end of setq ) ) ;_ end of cond (SETQ assocnt (1+ assocnt)) ) ;_ end of while ;;; (PRINC "\npagesetuplst = ") ;;; (PRINC pagesetuplst) (PRINC) (IF (MEMBER (STRCASE name_to_check) pagesetuplst) T nil ) ;_ end of if ) ;_ end of defun ;;;******************************************************************** (DEFUN bplots2k_error (msg /) (PRINC msg) (TERM_DIALOG) (IF bplots2k_luprec (SETVAR "luprec" bplots2k_luprec) ) ;_ end of if (IF bplots2k_cmdecho (SETVAR "cmdecho" bplots2k_cmdecho) ) ;_ end of if (IF bplots2k_expert (SETVAR "expert" bplots2k_expert) ) ;_ end of if (IF bplots2k_filedia (SETVAR "filedia" bplots2k_filedia) ) ;_ end of if (IF bplots2k_osmode (SETVAR "osmode" bplots2k_osmode) ) ;_ end of if (GRAPHSCR) (IF pre_bplots2k_error (SETQ *error* pre_bplots2k_error) (SETQ *error* nil) ) ;_ end of if (PRINC) ) ;_ end of defun (DEFUN bplots2k (pltlst plotr page1 fildrv savdwg qitend orgdir out_to forcedim0 / fp1 str01 str1 str2 str3 count ) (IF debug_doslib (PRINC "\nDOS_15 ") ) (IF (WCMATCH (DOS_COMPUTER) "RAL*") (SETQ confirm_acct T) (SETQ confirm_acct nil) ) ;_ end of if (IF debug_doslib (PRINC "\nDOS_15 ") ) (SETQ pre_bplots2k_error *error*) (IF jstscr (SETQ goplt nil) (SETQ goplt T) ) ;_ end of if (SETQ bplots2k_luprec (GETVAR "luprec")) (SETVAR "luprec" 4) (SETQ bplots2k_cmdecho (GETVAR "CMDECHO")) (SETVAR "cmdecho" 0) (SETQ bplots2k_expert (GETVAR "EXPERT")) (SETVAR "expert" 1) (SETQ bplots2k_filedia (GETVAR "FILEDIA")) (SETVAR "filedia" 0) (SETQ bplots2k_osmode (GETVAR "osmode")) (SETVAR "osmode" 0) (SETQ dwgp (GETVAR "dwgprefix")) (SETQ dwgn (GETVAR "dwgname")) (SETQ dwgnl (STRLEN dwgn)) (IF debug_doslib (PRINC "\nDOS_16 ") ) (IF DOS_USERNAME (SETQ lognm (DOS_USERNAME)) (IF (GETENV "LGN") (SETQ lognm (GETENV "LGN")) (SETQ lognm "NN") ) ;_ end of if ) ;_ end of if (IF debug_doslib (PRINC "\nDOS_16 ") ) (IF (EQ (SUBSTR dwgn 1 6) (SUBSTR dwgp 1 6)) (SETQ cdwg dwgn) (SETQ cdwg (STRCAT orgdir dwgn)) ) ;_ end of if (SETQ oldscr (FINDFILE (STRCAT pltdir lognm "bplot2k.scr"))) (IF debug_doslib (PRINC "\nDOS_17 ") ) (IF oldscr (DOS_DELETE oldscr) ) ;_ end of if (IF debug_doslib (PRINC "\nDOS_17 ") ) (IF (= savdwg "1") (SETQ svqt "Yes") (SETQ svqt "No") ) ;_ end of if (IF (= qitend "1") (SETQ qtdn "Yes") (SETQ qtdn "no") ) ;_ end of if ;;;First line written if just a script, Second line written if a plot script (SETQ str0 ".OPEN") (SETQ str01 "(if(eq(getvar\"dbmod\")0)(princ)\"Y\")") (SETQ str1 (STRCAT ;"(setq ftscl \"" "(setq pltout_fn NIL)(if c:plbl nil (load\"plbl\"))(c:plbl)" ) ;_ end of strcat ) ;_ end of setq (IF (> (STRLEN (STRCAT pltdir lognm "BPLOT2K.SCR")) 126) (PROGN (IF debug_doslib (PRINC "\nDOS_18 ") ) (SETQ scr_fname (STRCAT (DOS_SHORTPATH pltdir) lognm "BPLOT2K.SCR") ) ;_ end of SETQ (IF debug_doslib (PRINC "\nDOS_18 ") ) ) ;_ end of PROGN (SETQ scr_fname (STRCAT pltdir lognm "BPLOT2K.SCR")) ) ;_ end of IF (SETQ fp1 (OPEN scr_fname "w")) (IF job_number nil (PROGN (IF debug_doslib (PRINC "\nDOS_19 ") ) (SETQ subdirlst (DOS_SUBDIR)) (DOS_CHDIR "..") (IF (MEMBER (DOS_SUBDIR) subdirlst) nil (SETQ subdirlst (APPEND subdirlst (DOS_SUBDIR))) ) ;_ end of IF (DOS_CHDIR "..") (IF (MEMBER (DOS_SUBDIR) subdirlst) nil (SETQ subdirlst (APPEND subdirlst (DOS_SUBDIR))) ) ;_ end of IF (DOS_CHDIR "..") (IF (MEMBER (DOS_SUBDIR) subdirlst) nil (SETQ subdirlst (APPEND subdirlst (DOS_SUBDIR))) ) ;_ end of IF (DOS_CHDIR pltdir) (IF debug_doslib (PRINC "\nDOS_19 ") ) (FOREACH n subdirlst (IF (AND (WCMATCH pltdir (STRCAT "*\\" n "\\*")) (NOT (WCMATCH pltdir (STRCAT "*:\\" n "\\*"))) ) ;_ end of AND (COND ((AND (EQ (STRLEN n) 5) (EQ (TYPE (READ n)) 'int)) (SETQ job_number (READ n) subtsk# (IF subtsk# subtsk# 0.1 ) ;_ end of IF ) ;_ end of SETQ ) ((AND (> (STRLEN n) 5) (EQ (TYPE (READ (SUBSTR n 1 5))) 'int) ) ;_ end of AND (SETQ job_number (READ (SUBSTR n 1 5)) subtsk# (IF subtsk# subtsk# 0.1 ) ;_ end of IF ) ;_ end of SETQ ) ) ;_ end of COND ) ;_ end of IF ) ;_ end of FOREACH (IF job_number (SETQ job_number (+ job_number (IF subtsk# subtsk# 0.1 ) ;_ end of IF ) ;_ end of + ) ;_ end of SETQ ) ;_ end of IF ) ;_ end of PROGN ) ;_ end of IF (IF (AND (OR (WCMATCH plotr "*8825*") (WCMATCH plotr "*8830*")) (NOT jstscr) ) ;_ end of AND (PROGN (IF ureal nil (LOAD "ureal") ) ;_ end of if (SETQ job_number (ureal 1 "" "Job Account.SubTask Number?" (IF job_number job_number nil ) ;_ end of IF ) ;_ end of ureal ) ;_ end of SETQ (SETQ job_account (ITOA (FIX job_number))) (SETQ job_subtask (STRCAT (SUBSTR (RTOS (REM job_number (FIX job_number))) 3 1) (IF (ZEROP (ATOI (SUBSTR (RTOS (REM job_number (FIX job_number))) 4 1) ) ;_ end of atoi ) ;_ end of zerop "" (SUBSTR (RTOS (REM job_number (FIX job_number))) 4 1) ) ;_ end of if (IF (ZEROP (ATOI (SUBSTR (RTOS (REM job_number (FIX job_number))) 5 1) ) ;_ end of atoi ) ;_ end of zerop "" (SUBSTR (RTOS (REM job_number (FIX job_number))) 5 1) ) ;_ end of if (IF (ZEROP (ATOI (SUBSTR (RTOS (REM job_number (FIX job_number))) 6 1) ) ;_ end of atoi ) ;_ end of zerop "" (SUBSTR (RTOS (REM job_number (FIX job_number))) 6 1) ) ;_ end of if ) ;_ end of strcat ) ;_ end of setq ) ;_ end of PROGN ) ;_ end of IF (IF (AND (EQ svqt "Yes") (/= (GETVAR "dwgname") "UNNAMED") (/= (GETVAR "dwgname") "DRAWING.DWG") (NOT (WCMATCH (GETVAR "dwgname") "DRAWING#.DWG")) ) ;_ end of and (c:qsave) ) ;if (PRINC (STRCAT "\nCreating " pltdir lognm "BPLOT2K.SCR, please wait... " ) ;_ end of strcat ) ;_ end of princ (SETQ waitic "|" ticsid 1 pltcnt 0 ) ;_ end of setq (IF (AND prestr (/= prestr "")) (IF (EQ (SUBSTR prestr 1 8) "filename") (PROGN (SETQ prefil (FINDFILE (SUBSTR prestr 10))) (IF prefil nil (ALERT (STRCAT (SUBSTR prestr 10) "\nFile not found! It will not be included\nin the batch script you have created." ) ;_ end of strcat ) ;_ end of alert ) ;_ end of if ) ;_ end of progn ) ;_ end of if ) ;_ end of if (IF (AND pststr (/= pststr "")) (IF (EQ (SUBSTR pststr 1 8) "filename") (PROGN (SETQ pstfil (FINDFILE (SUBSTR pststr 10))) (IF pstfil nil (ALERT (STRCAT (SUBSTR pststr 10) "\nFile not found! It will not be included\nin the batch script you have created." ) ;_ end of strcat ) ;_ end of alert ) ;_ end of if ) ;_ end of progn ) ;_ end of if ) ;_ end of if (mkpage2) (FOREACH n pltlst (IF debug_doslib (PRINC "\nDOS_20 ") ) (SETQ split_fp (DOS_SPLITPATH n)) (IF debug_doslib (PRINC "\nDOS_20 ") ) (IF (EQ fildrv "with DWG") (SETQ plt_drv (CAR split_fp)) (SETQ plt_drv fildrv) ) ;_ end of IF (SETQ oldplt1 (STRCAT plt_drv (CADR split_fp) "Plots\\" frst_dir (CADDR split_fp) ;;; "-" ;;; (GETVAR "CTAB") ".plt*" ) ;_ end of strcat oldplt2 (STRCAT plt_drv (CADR split_fp) "Plots\\" frst_dir (CADDR split_fp) "-" (GETVAR "CTAB") ".plt*" ) ;_ end of strcat ) ;_ end of setq (IF (AND (NOT jstscr) (EQ out_to "Fileout") ) ;_ end of and (IF (EQ allayplt "1") (PROGN (IF debug_doslib (PRINC "\nDOS_21 ") ) (DOS_DELETE (STRCAT plt_drv (CADR split_fp) "Plots\\" frst_dir (CADDR split_fp) "*.plt*" ) ;_ end of STRCAT ) ;_ end of dos_delete (IF debug_doslib (PRINC "\nDOS_21 ") ) (IF debug_doslib (PROGN (PRINC "\nallayplt=") (PRINC (STRCAT plt_drv (CADR split_fp) "Plots\\" frst_dir (CADDR split_fp) "*.plt*" ) ;_ end of STRCAT ) ;_ end of PRINC (PRINC) ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of PROGN (PROGN (IF debug_doslib (PRINC "\nDOS_22 ") ) (DOS_DELETE oldplt1) (DOS_DELETE oldplt2) (IF debug_doslib (PRINC "\nDOS_22 ") ) (IF debug_doslib (PROGN (PRINC "\noldplt1=") (PRINC oldplt1) (PRINC "\noldplt2=") (PRINC oldplt2) (PRINC) ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of if (IF debug_doslib (PRINC "\nDOS_23 ") ) (IF debug_doslib (PRINC "\nDOS_23 ") ) (IF (AND (NOT jstscr) (EQ out_to "Fileout") (EQ dblplt "1") (SETQ oldplth ;;; (findfile (strcat (substr n 1 (- (strlen n) 4)) ".PLT")) (FINDFILE (STRCAT plt_drv (CADR split_fp) "Plots\\" (CADDR split_fp) ".plt" ) ;_ end of strcat ) ;_ end of findfile ) ;_ end of setq ) ;_ end of and (DOS_DELETE oldplth) ) ;_ end of if (IF debug_doslib (PRINC "\nDOS_24 ") ) ;;; (IF (AND oldplt oldplth) ;;; NIL (IF jstscr (wait_spin) (mkpltdirs) ) ;_ end of IF ;;; ) ;_ end of IF (SETQ output_fn (IF (OR (WCMATCH (CADR split_fp) "* *") (WCMATCH (CADDR split_fp) "* *") ) ;_ end of OR (STRCAT "\"" plt_drv (CADR split_fp) "Plots\\" (IF frst_dir frst_dir "A\\" ) ;_ end of IF (CADDR split_fp) ".plt\"" ) ;_ end of strcat (STRCAT plt_drv (CADR split_fp) "Plots\\" (IF frst_dir frst_dir "A\\" ) ;_ end of IF (CADDR split_fp) ".plt" ) ;_ end of strcat ) ;_ end of IF ) ;_ end of setq (IF (EQ out_to "Fileout") (PROGN (SETQ fnstepcnt 1 plot_fn output_fn ;output filename ) ;_ end of setq (WHILE (AND (WCMATCH plot_fn "*[~\\]\\[~\\]*") (IF (>= fnstepcnt (1- (STRLEN plot_fn))) (NOT (WCMATCH (SUBSTR plot_fn (1- (STRLEN plot_fn)) 2) "\\\\" ) ;_ end of wcmatch ) ;_ end of not T ) ;_ end of if ) ;_ end of and (IF (WCMATCH (SUBSTR plot_fn fnstepcnt) "\\[~\\]*") (SETQ plot_fn (STRCAT (SUBSTR plot_fn 1 (1- fnstepcnt)) "\\" (SUBSTR plot_fn fnstepcnt) ) ;_ end of strcat fnstepcnt (+ fnstepcnt 2) ) ;_ end of setq (SETQ fnstepcnt (1+ fnstepcnt)) ) ;_ end of if (IF debug_bplot2k (PROGN (PRINC (STRCAT "\nplot_fn(" (ITOA fnstepcnt) ")=")) (PRINC plot_fn) (PRINC "\nplot_fn_a=") (PRINC (SUBSTR plot_fn 1 (- (STRLEN plot_fn) 5))) (PRINC "\n") (PRINC) ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of while (IF (EQ (SUBSTR plot_fn 1 1) "\"") nil (SETQ plot_fn (STRCAT "\"" plot_fn)) ) ;_ end of IF (IF (EQ (SUBSTR plot_fn (STRLEN plot_fn)) "\"") (SETQ plot_fn_a (SUBSTR plot_fn 1 (- (STRLEN plot_fn) 5))) (SETQ plot_fn_a (SUBSTR plot_fn 1 (- (STRLEN plot_fn) 4))) ) ;_ end of IF (SETQ plot_fn (STRCAT "(STRCAT " plot_fn_a "-\"" "(IF(EQ allayplt \"1\")(CAR(LAYOUTLIST))(GETVAR \"ctab\")) \".plt\")" ) ;_ end of STRCAT ) ;_ end of SETQ (SETQ str1 (STRCAT ;"(setq ftscl \"" output_fn "(setq pltoutfn " plot_fn ") (if c:plbl nil (load\"plbl\"))(c:plbl)" ) ;_ end of strcat ) ;_ end of setq ) ;_ end of progn ) ;_ end of if (SETQ oldplt1 nil oldplt2 nil oldplth nil ) ;_ end of SETQ (SETQ pltcnt (1+ pltcnt)) (wait_spin) (IF goplt (IF (>= (- (STRLEN (GETVAR "dwgname")) (- (STRLEN n) 5)) 1) (IF (OR (EQ n (FINDFILE (CAR d_flst))) (EQ n (STRCAT (GETVAR "dwgprefix") (GETVAR "dwgname"))) ) ;_ end of or nil (PROGN ;;; (princ "\n\t\t************************************************************") ;;; (princ n) ;;; (princ "\n\t\t************************************************************") ;;; (princ (findfile (car d_flst))) ;;; (princ "\n\t\t************************************************************") ;;; (princ) (WRITE-LINE str0 fp1) ;;; (if (/= (getvar "dbmod") 0) ;;;Second line written if just a script, Third if a plot script ;;;Only written if drawing has been modified. ;;;Responds "Yes" to discard changes (WRITE-LINE str01 fp1) ;; ) ;if (IF (WCMATCH n "* *") (WRITE-LINE (STRCAT "\"" n "\"") fp1) (WRITE-LINE n fp1) ) ;_ end of if ) ;progn ) ;if (IF (EQ (STRCASE (STRCAT (GETVAR "dwgprefix") (IF (WCMATCH dwgn "*\\*") (WHILE (WCMATCH dwgn "*\\*") (SETQ dwgn (SUBSTR dwgn 2)) ) ;_ end of while dwgn ) ;_ end of if ; ".DWG" ) ;_ end of strcat ) ;_ end of strcase (STRCASE n) ) ;_ end of eq nil (PROGN (WRITE-LINE str0 fp1) (WRITE-LINE str01 fp1) (IF (WCMATCH n "* *") (WRITE-LINE (STRCAT "\"" n "\"") fp1) (WRITE-LINE n fp1) ) ;_ end of if (WRITE-LINE "(SETQ ostr \" Opened for editing....: \" ONAM NIL)(dlog)" fp1 ) ;_ end of write-line ) ;_ end of progn ) ;_ end of if ) ;_ end of if ;;; (if ;;; (or ;;; (eq n (FINDFILE (CAR d_flst))) ;;; (eq n (strcat (getvar "dwgprefix") (getvar "dwgname"))) ;;; ) ;;; nil (PROGN (WRITE-LINE str0 fp1) (WRITE-LINE str01 fp1) (IF (WCMATCH n "* *") (WRITE-LINE (STRCAT "\"" n "\"") fp1) ;;;Write filename to open (WRITE-LINE n fp1) ) ;_ end of if (WRITE-LINE "(SETQ ostr \" Opened for editing....: \" ONAM NIL)(dlog)" fp1 ) ;_ end of write-line ) ;_ end of progn ;;; ) ) ;_ end of if (IF (EQ forcedim0 "1") (WRITE-LINE "dimscale 0" fp1) ) ;_ end of if (IF (AND prestr (/= prestr "")) (IF (EQ (SUBSTR prestr 1 8) "filename") (PROGN (SETQ prefil (FINDFILE (SUBSTR prestr 10))) (IF prefil (PROGN (SETQ opref (OPEN prefil "r")) (WHILE (SETQ pflin (READ-LINE opref)) ;;;Write contents of specified pre-plot script file (WRITE-LINE pflin fp1) ) ;_ end of while (CLOSE opref) ) ;_ end of progn ) ;_ end of if ) ;_ end of progn ;;;Or, Write contents of Bplot's pre-plot script edit box (WRITE-LINE prestr fp1) ) ;_ end of if ) ;_ end of if ;;; (PRINC "\nins_fname=") ;;; (princ ins_fname) ;;; (princ "\nn=") ;;; (princ n) ;;; (princ) ;;;Write etransmit-folder script if requested (IF (EQ etrf_scr "1") (PROGN (WRITE-LINE "(if etransfiles nil (load \"etransfiles\" \"FIle ETRANSFILES.LSP not loaded! \"))" fp1 ) ;_ end of WRITE-LINE (WRITE-LINE "(IF(EQ(GETVAR\"tilemode\")0)(COMMAND \".pspace\"))" fp1) (WRITE-LINE ".zoom" fp1) (WRITE-LINE "e" fp1) (WRITE-LINE "(c:qsave)" fp1) (WRITE-LINE "(etransmkdir)" fp1) (WRITE-LINE "(etransdelete)" fp1) (WRITE-LINE "-etransmit" fp1) (WRITE-LINE "Folder" fp1) (WRITE-LINE (STRCAT (DOS_FULLPATH "..\\") "815 Submittals\\Temp\\") fp1 ) ;_ end of WRITE-LINE (WRITE-LINE "" fp1) (WRITE-LINE "Yes" fp1) (WRITE-LINE "No" fp1) (WRITE-LINE "No" fp1) (WRITE-LINE "Yes" fp1) (WRITE-LINE "No" fp1) (WRITE-LINE "(etransfiles)" fp1) ) ;_ end of PROGN ) ;_ end of IF (IF jstscr (IF (EQ ins_fname "1") (WRITE-LINE (STRCAT "\"" (SUBSTR n 1 (- (STRLEN n) 4)) "\"") fp1 ) ;_ end of write-line ) ;_ end of if ;;;Write lisp string for calculating drawing scale (PROGN ;;;Write lisp string for forcing PSTYLEMODE=1 (WRITE-LINE "(if c:psty2ctb nil (load \"psty2ctb\" \"\\nFile PSTY2CTB.LSP not loaded! \"))" fp1 ) ;_ end of write-line (WRITE-LINE "(if c:psty2ctb (c:psty2ctb))" fp1) (IF (WCMATCH page1 "* MS*") (WRITE-LINE "(SETVAR \"TILEMODE\" 1)" fp1) (WRITE-LINE "(SETVAR \"TILEMODE\" 0)" fp1) ) ;_ end of IF (WRITE-LINE (STRCAT "(COND((AND(WCMATCH\"" (SUBSTR page1 6) "\"\"##*MS\") (EQ(GETVAR\"DIMSCALE\")0))(SETVAR\"DIMSCALE\"(/(-(CADR(GETVAR\"LIMMAX\"))(CADR(GETVAR\"LIMMIN\")))(ATOI\"" (SUBSTR page1 9 2) "\")))))" ) ;_ end of strcat fp1 ) ;_ end of write-line (WRITE-LINE str1 fp1) ) ;_ end of progn ) ;_ end of if (IF (NOT jstscr) (PROGN (mkpage2) (WRITE-LINE "(if loadpages nil (load \"bplot2k\" \"File BPLOT2K.LSP not loaded! \"))" fp1 ) ;_ end of write-line (WRITE-LINE "(if loadpages (loadpages))" fp1) (IF (AND (EQ (SUBSTR (GETVAR "acadver") 1 2) "16") (NOT (WCMATCH (STRCASE page1) "*HP*")) ) ;_ end of and (WRITE-LINE "(COMMAND \"-PLOT\" \"Yes\")" fp1) (WRITE-LINE "(COMMAND \"-PLOT\" \"\")" fp1) ) ;_ end of if (IF (WCMATCH page1 "* MS*") (WRITE-LINE "" fp1) (IF (EQ allayplt "1") (WRITE-LINE "(car (layoutlist))" fp1) (WRITE-LINE "(IF(EQ(getvar \"ctab\")\"Model\")(car (layoutlist))(getvar \"ctab\"))" fp1 ) ;_ end of write-line ) ;_ end of IF ) ;_ end of IF (IF (AND (EQ (SUBSTR (GETVAR "ACADVER") 1 2) "16") (NOT (WCMATCH (STRCASE page1) "*HP*")) ) ;_ end of AND nil (WRITE-LINE page1 fp1) ) ;_ end of IF ; (write-line (strcat plotr ".pc3") fp1) (SETQ plot_device plotr) (WRITE-LINE plotr fp1) ;;;The next code section is a detailed plot configuration which cannot use a page setup. It is to work around the ;;;"invalid media configuration" bug associated with using page setups with command-line plots (scripts) in R16. ;;;Use page setups without detailed configuration of command-line plots whenever possible. (IF (AND (EQ (SUBSTR (GETVAR "ACADVER") 1 2) "16") (NOT (WCMATCH (STRCASE page1) "*HP*")) ) ;_ end of AND (PROGN (IF (WCMATCH (STRCASE page1) "*##X## ###DPI*") (PROGN (SETQ strcnt 1) (WHILE (NOT (WCMATCH (SUBSTR (STRCASE page1) strcnt) "##X## ###DPI*" ) ;_ end of WCMATCH ) ;_ end of NOT (SETQ strcnt (1+ strcnt)) ) ;_ end of WHILE (SETQ pagesize1s (SUBSTR page1 strcnt 2) pagesize2s (SUBSTR page1 (+ strcnt 3) 2) dpiresstr (SUBSTR page1 (+ strcnt 6) 3) pagesize1i (ATOI pagesize1s) pagesize2i (ATOI pagesize2s) dpiresint (ATOI dpiresstr) ) ;_ end of SETQ (IF (EQ pagesize1i 85) (SETQ pagesize1i 8.5) ) ;_ end of IF (IF (EQ pagesize2i 85) (SETQ pagesize2i 8.5) ) ;_ end of IF ) ;_ end of PROGN (PROGN (SETQ pagesize1s nil pagesize2s nil dpiresstr nil pagesize1i nil pagesize2i nil dpiresint nil ) ;_ end of SETQ ) ;_ end of PROGN ) ;_ end of IF (COND ((AND pagesize1i pagesize2i dpiresint (OR (WCMATCH plotr "TIFF*") (WCMATCH plotr "PublishToWeb JPG") ) ;_ end of or ) ;_ end of AND (SETQ bppaperwidth (COND ;;; ((EQ pagesize1i 42) ;;; (RTOS(*(- pagesize1i 0.5) dpiresint)2 2)) ;;; ((EQ pagesize1i 36) ;;; (RTOS(*(- pagesize1i 0.5) dpiresint)2 2)) (T (RTOS (* pagesize1i dpiresint) 2 2)) ) ;_ end of COND bppaperwidth (COND ((WCMATCH bppaperwidth "*#.##") bppaperwidth ) ((WCMATCH bppaperwidth "*#.#") (STRCAT bppaperwidth "0") ) ((WCMATCH bppaperwidth "*#") (STRCAT bppaperwidth ".00") ) ) ;_ end of COND bppaperheight (COND ;;; ((EQ pagesize2i 30) ;;; (RTOS(*(- pagesize2i 0.6) dpiresint)2 2)) ;;; ((EQ pagesize2i 24) ;;; (RTOS(*(- pagesize2i 0.75) dpiresint)2 2)) (T (RTOS (* pagesize2i dpiresint) 2 2) ) ) ;_ end of COND bppaperheight (COND ((WCMATCH bppaperheight "*#.##") bppaperheight ) ((WCMATCH bppaperheight "*#.#") (STRCAT bppaperheight "0") ) ((WCMATCH bppaperheight "*#") (STRCAT bppaperheight ".00") ) ) ;_ end of COND ) ;_ end of SETQ (SETQ plot_paper_size (STRCAT pagesize1s "X" pagesize2s " " dpiresstr "dpi " (CHR 040) bppaperwidth " x " bppaperheight " Pixels" (CHR 041) ) ;_ end of STRCAT ) ;_ end of SETQ (WRITE-LINE plot_paper_size fp1) ) ;;; ((OR ;;; (AND(OR(WCMATCH (STRCASE page1) "*40X28*")(WCMATCH (STRCASE page1) "*28X40*"))(WCMATCH (STRCASE page1) "*300DPI*")) ;;; (EQ(GETVAR "limmax")(LIST 40.0 28.0)) ;;; (EQ(GETVAR "limmax")(LIST 28.0 40.0))) ;;; (WRITE-LINE "40x28 300dpi (12000.00 x 8400.00 Pixels)" fp1)) ;;; ((AND(OR(WCMATCH (STRCASE page1) "*40X28*")(WCMATCH (STRCASE page1) "*28X40*"))(WCMATCH (STRCASE page1) "*400DPI*")) ;;; (WRITE-LINE "40x28 400dpi (16000.00 x 11200.00 Pixels)" fp1)) ;;; ((OR ;;; (AND(OR(WCMATCH (STRCASE page1) "*42X30*")(WCMATCH (STRCASE page1) "*30X42*"))(WCMATCH (STRCASE page1) "*300DPI*")) ;;; (EQ(GETVAR "limmax")(LIST 42.0 30.0)) ;;; (EQ(GETVAR "limmax")(LIST 30.0 42.0))) ;;; (WRITE-LINE "42x30 300dpi (12600.00 x 9000.00 Pixels)" fp1)) ;;; ((AND(OR(WCMATCH (STRCASE page1) "*42X30*")(WCMATCH (STRCASE page1) "*30X42*"))(WCMATCH (STRCASE page1) "*400DPI*")) ;;; (WRITE-LINE "42x30 400dpi (16800.00 x 12000.00 Pixels)" fp1)) ;;; ((OR ;;; (AND(OR(WCMATCH (STRCASE page1) "*36X24*")(WCMATCH (STRCASE page1) "*24X36*"))(WCMATCH (STRCASE page1) "*300DPI*")) ;;; (EQ(GETVAR "limmax")(LIST 36.0 24.0)) ;;; (EQ(GETVAR "limmax")(LIST 24.0 36.0))) ;;; (WRITE-LINE "36x24 300dpi (10800.00 x 7200.00 Pixels)" fp1)) ;;; ((AND(OR(WCMATCH (STRCASE page1) "*36X24*")(WCMATCH (STRCASE page1) "*24X36*"))(WCMATCH (STRCASE page1) "*400DPI*")) ;;; (WRITE-LINE "36x24 400dpi (14400.00 x 9600.00 Pixels)" fp1)) ;;; ((OR ;;; (AND(OR(WCMATCH (STRCASE page1) "*34X22*")(WCMATCH (STRCASE page1) "*22X34*"))(WCMATCH (STRCASE page1) "*300DPI*")) ;;; (EQ(GETVAR "limmax")(LIST 34.0 22.0)) ;;; (EQ(GETVAR "limmax")(LIST 22.0 34.0))) ;;; (WRITE-LINE "34x22 300dpi (10200.00 x 6600.00 Pixels)" fp1)) ;;; ((AND(OR(WCMATCH (STRCASE page1) "*34X22*")(WCMATCH (STRCASE page1) "*22X34*"))(WCMATCH (STRCASE page1) "*400DPI*")) ;;; (WRITE-LINE "34x22 400dpi (13600.00 x 8800.00 Pixels)" fp1)) ;;; ((OR ;;; (AND(OR(WCMATCH (STRCASE page1) "*17X22*")(WCMATCH (STRCASE page1) "*22X17*"))(WCMATCH (STRCASE page1) "*300DPI*")) ;;; (EQ(GETVAR "limmax")(LIST 17.0 22.0)) ;;; (EQ(GETVAR "limmax")(LIST 22.0 17.0))) ;;; (WRITE-LINE "22x17 300dpi (6600.00 x 5100.00 Pixels)" fp1)) ;;; ((AND(OR(WCMATCH (STRCASE page1) "*17X22*")(WCMATCH (STRCASE page1) "*22X17*"))(WCMATCH (STRCASE page1) "*400DPI*")) ;;; (WRITE-LINE "22x17 400dpi (6800.00 x 4400.00 Pixels)" fp1)) ;;; ((OR ;;; (AND(OR(WCMATCH (STRCASE page1) "*17X11*")(WCMATCH (STRCASE page1) "*11X17*"))(WCMATCH (STRCASE page1) "*300DPI*")) ;;; (EQ(GETVAR "limmax")(LIST 17.0 11.0)) ;;; (EQ(GETVAR "limmax")(LIST 11.0 17.0))) ;;; (WRITE-LINE "17x11 300dpi (5100.00 x 3300.00 Pixels)" fp1)) ;;; ((AND(OR(WCMATCH (STRCASE page1) "*17X11*")(WCMATCH (STRCASE page1) "*11X17*"))(WCMATCH (STRCASE page1) "*400DPI*")) ;;; (WRITE-LINE "17x11 400dpi (6800.00 x 4400.00 Pixels)" fp1)) ;;; ((OR ;;; (AND(OR(WCMATCH (STRCASE page1) "*85X11*")(WCMATCH (STRCASE page1) "*11X85*"))(WCMATCH (STRCASE page1) "*300DPI*")) ;;; (EQ(GETVAR "limmax")(LIST 8.5 11.0)) ;;; (EQ(GETVAR "limmax")(LIST 11.0 8.5))) ;;; (WRITE-LINE "11x85 300dpi (3300.00 x 2550.00 Pixels)" fp1)) ;;; ((AND(OR(WCMATCH (STRCASE page1) "*85X11*")(WCMATCH (STRCASE page1) "*11X85*"))(WCMATCH (STRCASE page1) "*400DPI*")) ;;; (WRITE-LINE "11x85 400dpi (4400.00 x 3400.00 Pixels)" fp1)) ((WCMATCH plotr "Adobe PDF") (COND ((WCMATCH page1 "PDF 34X22 PS") (SETQ plot_paper_size "PostScript Custom Page Size") (SETQ plot_units "Inches") ) ((WCMATCH page1 "PDF 40X28 PS") (SETQ plot_paper_size "ANSI F - 2") (SETQ plot_units "Inches") ) ) ;_ end of COND (WRITE-LINE plot_paper_size fp1) (WRITE-LINE plot_units fp1) ) (T (SETQ plot_paper_size "34x22 300dpi (10200.00 x 6600.00 Pixels)" ) ;_ end of SETQ (SETQ page1 plot_paper_size pagesize1s (SUBSTR page1 1 2) pagesize2s (SUBSTR page1 4 2) dpiresstr (SUBSTR page1 7 3) pagesize1i (ATOI pagesize1s) pagesize2i (ATOI pagesize2s) dpiresint (ATOI dpiresstr) ) ;_ end of SETQ (SETQ bppaperwidth (COND ;;; ((EQ pagesize1i 42) ;;; (RTOS(*(- pagesize1i 0.5) dpiresint)2 2)) ;;; ((EQ pagesize1i 36) ;;; (RTOS(*(- pagesize1i 0.5) dpiresint)2 2)) (T (RTOS (* pagesize1i dpiresint) 2 2)) ) ;_ end of COND bppaperwidth (COND ((WCMATCH bppaperwidth "*#.##") bppaperwidth ) ((WCMATCH bppaperwidth "*#.#") (STRCAT bppaperwidth "0") ) ((WCMATCH bppaperwidth "*#") (STRCAT bppaperwidth ".00") ) ) ;_ end of COND bppaperheight (COND ;;; ((EQ pagesize2i 30) ;;; (RTOS(*(- pagesize2i 0.6) dpiresint)2 2)) ;;; ((EQ pagesize2i 24) ;;; (RTOS(*(- pagesize2i 0.75) dpiresint)2 2)) (T (RTOS (* pagesize2i dpiresint) 2 2) ) ) ;_ end of COND bppaperheight (COND ((WCMATCH bppaperheight "*#.##") bppaperheight ) ((WCMATCH bppaperheight "*#.#") (STRCAT bppaperheight "0") ) ((WCMATCH bppaperheight "*#") (STRCAT bppaperheight ".00") ) ) ;_ end of COND ) ;_ end of SETQ (WRITE-LINE plot_paper_size fp1) ) ) ;_ end of COND (COND ((< pagesize1i pagesize2i) (SETQ plot_orientation "Portrait") ) ;;; ((OR ;;; (EQUAL(GETVAR "limmax")(LIST 30.0 42.0) 0.01) ;;; (EQUAL(GETVAR "limmax")(LIST 28.0 40.0) 0.01) ;;; (EQUAL(GETVAR "limmax")(LIST 24.0 36.0) 0.01) ;;; (EQUAL(GETVAR "limmax")(LIST 22.0 34.0) 0.01) ;;; (EQUAL(GETVAR "limmax")(LIST 17.0 22.0) 0.01) ;;; (EQUAL(GETVAR "limmax")(LIST 11.0 17.0) 0.01) ;;; (EQUAL(GETVAR "limmax")(LIST 8.5 11.0) 0.01) ;;; ) ;;; (SETQ plot_orientation "Portrait")) (T (SETQ plot_orientation "Landscape") ) ) ;_ end of COND (WRITE-LINE plot_orientation fp1) (SETQ plot_upside_down "No") (WRITE-LINE plot_upside_down fp1) (SETQ plot_area "Window") (WRITE-LINE plot_area fp1) (SETQ plot_window_llcor "(GETVAR \"limmin\")") ;;; (SETQ plot_window_llcor "(getvar\"limmin\")") (WRITE-LINE plot_window_llcor fp1) (SETQ window_urcor (STRCAT (RTOS pagesize1i 2 2) "," (RTOS pagesize2i 2 2) ) ;_ end of STRCAT ) ;_ end of SETQ (SETQ plot_window_urcor (STRCAT "(IF(OR(EQ(GETVAR\"DIMSCALE\")0)(EQ(GETVAR\"DIMSCALE\")1))" "(STRCAT(RTOS(+ pagesize1i(CAR(GETVAR \"limmin\")))2 2)\",\"(RTOS(+ pagesize2i(CADR(GETVAR \"limmin\")))2 2))" "(STRCAT(RTOS(CAR(GETVAR\"limmax\"))2 2)\",\"(RTOS(CADR(GETVAR\"limmax\"))2 2))" ")" ) ) ;_ end of SETQ ;;; (SETQ plot_window_urcor "(getvar\"limmax\")") (WRITE-LINE plot_window_urcor fp1) (COND ((WCMATCH plotr "Adobe PDF") (SETQ plot_scale "1=1") ) (dpiresstr (IF (WCMATCH page1 "*#scl *") (PROGN (COND ((WCMATCH page1 "* ####scl *") (SETQ pgstrcnt 2) (WHILE (NOT (WCMATCH (SUBSTR page1 pgstrcnt) "####scl *") ) ;_ end of NOT (SETQ pgstrcnt (1+ pgstrcnt)) ) ;_ end of WHILE (SETQ sclfactor (ATOI (SUBSTR page1 pgstrcnt 4))) ) ((WCMATCH page1 "* ###scl *") (SETQ pgstrcnt 2) (WHILE (NOT (WCMATCH (SUBSTR page1 pgstrcnt) "###scl *") ) ;_ end of NOT (SETQ pgstrcnt (1+ pgstrcnt)) ) ;_ end of WHILE (SETQ sclfactor (ATOI (SUBSTR page1 pgstrcnt 3))) ) ((WCMATCH page1 "* ##scl *") (SETQ pgstrcnt 2) (WHILE (NOT (WCMATCH (SUBSTR page1 pgstrcnt) "##scl *") ) ;_ end of NOT (SETQ pgstrcnt (1+ pgstrcnt)) ) ;_ end of WHILE (SETQ sclfactor (ATOI (SUBSTR page1 pgstrcnt 2))) ) ((WCMATCH page1 "* #scl *") (SETQ pgstrcnt 2) (WHILE (NOT (WCMATCH (SUBSTR page1 pgstrcnt) "#scl *")) (SETQ pgstrcnt (1+ pgstrcnt)) ) ;_ end of WHILE (SETQ sclfactor (ATOI (SUBSTR page1 pgstrcnt 1))) ) ) ;_ end of COND (SETQ plot_scale (STRCAT (ITOA (/ (ATOI dpiresstr) sclfactor)) "=1" ) ;_ end of STRCAT ) ;_ end of SETQ ) ;_ end of PROGN (SETQ plot_scale (STRCAT dpiresstr "=1")) ) ;_ end of IF ) ((WCMATCH (STRCASE page1) "*400DPI*") (SETQ plot_scale "400=1") ) (T (SETQ plot_scale "300=1") ) ) ;_ end of COND (WRITE-LINE plot_scale fp1) (SETQ plot_offset "Center") (WRITE-LINE plot_offset fp1) (SETQ plot_with_style "Yes") (WRITE-LINE plot_with_style fp1) (COND ((WCMATCH plotr "Adobe PDF") (SETQ plot_table_file "HUA Std B&W.ctb") ) ((WCMATCH plotr "PublishToWeb JPG") (SETQ plot_table_file "JPG 400dpi ANSI-A.ctb") ) ((WCMATCH (STRCASE page1) "*300DPI*") (SETQ plot_table_file "TIFF 300dpi.ctb") ) ((WCMATCH (STRCASE page1) "*400DPI*") (SETQ plot_table_file "TIFF 400dpi.ctb") ) (dpiresstr (SETQ plot_table_file (STRCAT "TIFF " dpiresstr "dpi.ctb") ) ;_ end of SETQ ) ) ;_ end of COND (WRITE-LINE plot_table_file fp1) (COND ((WCMATCH plotr "Adobe PDF") (SETQ ;plot_std_answers "Yes No No No" plot_with_lineweights "Yes" ) ;_ end of SETQ ) ((WCMATCH page1 "* MS") (SETQ ;plot_std_answers "Yes W" plot_with_lineweights "Yes" ) ;_ end of SETQ ) ((WCMATCH plotr "PublishToWeb JPG") (SETQ ;plot_std_answers "Yes No No No" plot_with_lineweights "Yes" ) ;_ end of SETQ ) (T (SETQ ;plot_std_answers "Yes No Yes No" plot_with_lineweights "Yes" ) ;_ end of SETQ ) ) ;_ end of COND (SETQ plot_scale_lineweights "No") (SETQ plot_paper_first "Yes") (SETQ plot_hide_paper "No") (WRITE-LINE plot_with_lineweights fp1) (WRITE-LINE plot_scale_lineweights fp1) (WRITE-LINE plot_paper_first fp1) (WRITE-LINE plot_hide_paper fp1) ) ;_ end of PROGN ) ;_ end of IF ;;;End of work around ;;; (setq output_fn ;;; (IF (OR (WCMATCH (CADR split_fp) "* *")(WCMATCH (CADDR split_fp) "* *")) ;;; (strcat "\"" ;;; plt_drv ;;; (CADR split_fp) ;;; "Plots\\" ;;; (IF frst_dir ;;; frst_dir ;;; "A\\" ;;; ) ;;; (CADDR split_fp) ;;; ".plt\"" ;;; ) ;_ end of strcat ;;; (strcat plt_drv ;;; (CADR split_fp) ;;; "Plots\\" ;;; (IF frst_dir ;;; frst_dir ;;; "A\\" ;;; ) ;;; (CADDR split_fp) ;;; ".plt" ;;; ) ;_ end of strcat ;;; ) ;;; ) (SETQ plot_dwgfilepath plot_fn) (IF (EQ out_to "Fileout") (PROGN (IF (> (READ (GETVAR "ACADVER")) 15.05) (PROGN (WRITE-LINE plot_fn fp1 ) ;_ end of write-line ) ;_ end of PROGN (PROGN (WRITE-LINE "Yes" fp1) (WRITE-LINE plot_fn fp1 ) ;_ end of write-line ) ;_ end of PROGN ) ;_ end of IF ) ;_ end of PROGN (WRITE-LINE "No" fp1) ) ;_ end of if (SETQ plot_save_setup "Yes") (WRITE-LINE plot_save_setup fp1) (SETQ plot_proceed "Yes") (WRITE-LINE plot_proceed fp1) (IF (EQ allayplt "1") (WRITE-LINE "(batlayplt)" fp1) ) ;_ end of IF (IF (AND (EQ dblplt "1") found_pg2) (PROGN (WRITE-LINE "(COMMAND \"-PLOT\" \"\")" fp1) (WRITE-LINE "(car (layoutlist))" fp1) (WRITE-LINE page2 fp1) (WRITE-LINE (STRCAT plotr ".pc3") fp1) (IF (EQ out_to "Fileout") (PROGN (WRITE-LINE "Yes" fp1) (WRITE-LINE (IF (OR (WCMATCH (CADR split_fp) "* *") (WCMATCH (CADDR split_fp) "* *") ) ;_ end of OR (STRCAT "\"" plt_drv (CADR split_fp) "Plots\\" (IF scnd_dir scnd_dir "B\\" ) ;_ end of IF (CADDR split_fp) ".plt\"" ) ;_ end of strcat (STRCAT plt_drv (CADR split_fp) "Plots\\" (IF scnd_dir scnd_dir "B\\" ) ;_ end of IF (CADDR split_fp) ".plt" ) ;_ end of strcat ) ;_ end of IF fp1 ) ;_ end of write-line ) ;_ end of PROGN (WRITE-LINE "No" fp1) ) ;_ end of if (WRITE-LINE "No" fp1) (WRITE-LINE "Yes" fp1) ) ;_ end of PROGN (PROGN ;;; (PRINC "\n\n\t\tdblplt = ") ;;; (PRINC dblplt) ;;; (PRINC "\n\t\tpage2 = ") ;;; (princ page2) ;;; (PRINC "\n\t\tfound_pg2 = ") ;;; (PRINC found_pg2) ;;; (PRINC "\n\t\tsetupslst = ") ;;; (princ setupslst) (PRINC) ) ;_ end of PROGN ) ;_ end of IF ;;; (pst_scr) (COND ((>= (STRLEN plotr) 14) (WRITE-LINE (STRCAT "(setq fstr \" " plotr " Plotted: \")(dlog)" ) ;_ end of strcat fp1 ) ;_ end of write-line ) ((< (STRLEN plotr) 14) (SETQ pltdstr " Plotted") (WHILE (< (STRLEN (STRCAT " " plotr pltdstr ": \"")) 28) (SETQ pltdstr (STRCAT pltdstr ".")) ) ;_ end of WHILE (WRITE-LINE (STRCAT "(setq fstr \" " plotr pltdstr ": \")(dlog)" ) ;_ end of strcat fp1 ) ;_ end of write-line ) ) ;_ end of COND (pst_scr) ) ;_ end of progn (PROGN ;;; (if(eq forcedim0 "1") ;;; (write-line "dimscale 0" fp1) ;;; ) (pst_scr) ) ;_ end of progn ) ;_ end of if (SETQ goplt nil) ) ;_ end of foreach (IF (SETQ plots_remain (IF (EQ allayplt "1") (PROGN (IF debug_doslib (PRINC "\nDOS_23A ") ) (DOS_DIR (STRCAT plt_drv (CADR split_fp) "Plots\\" frst_dir (CADDR split_fp) "*.plt.tif" ) ;_ end of STRCAT 0 ) ;_ end of DOS_DIR ) (PROGN (IF debug_doslib (PRINC "\nDOS_23B ") ) (IF (OR oldplt1 oldplt2) (APPEND (DOS_DIR oldplt1 0)(DOS_DIR oldplt2 0)) ) ) ) ;_ end of IF ) ;_ end of SETQ (PROGN (SETQ rem_plot_names "" rem_count 0 ) ;_ end of SETQ (FOREACH n plots_remain (IF (>= rem_count 15) (IF (AND rem_plot_names (> (STRLEN rem_plot_names) 3) (EQ (SUBSTR rem_plot_names (- (STRLEN rem_plot_names) 2) 3 ) ;_ end of SUBSTR "..." ) ;_ end of EQ ) ;_ end of AND nil (SETQ rem_plot_names (STRCAT rem_plot_names "\n\t(and " (ITOA (- (LENGTH plots_remain) rem_count) ) ;_ end of ITOA " more)..." ) ;_ end of STRCAT ) ;_ end of SETQ ) ;_ end of IF (SETQ rem_plot_names (STRCAT rem_plot_names "\n\t" n)) ) ;_ end of IF (SETQ rem_count (1+ rem_count)) ) ;_ end of foreach (ALERT (STRCAT "These plot files could not be deleted!\n" rem_plot_names "\n\nBatch Plot will fail if it tries to overwrite these plot files." "\nThis usually happens when a program has the plot file open." ) ;_ end of STRCAT ) ;_ end of ALERT ) ;_ end of PROGN ) ;_ end of IF (IF (= pltcnt 1) (PRINC (STRCAT "\010Done! Ready to plot " (NTH 0 pltlst) ". ") ) ;_ end of princ (PRINC (STRCAT "\010Done! Ready to plot " (ITOA pltcnt) " drawings" (IF (AND (EQ dblplt "1") frst_dir scnd_dir) (STRCAT " 2 sizes, 1 each at " (SUBSTR frst_dir 1 (1- (STRLEN frst_dir))) " and " (SUBSTR scnd_dir 1 (1- (STRLEN scnd_dir))) ". " ) ;_ end of STRCAT ". " ) ;_ end of IF ) ;_ end of strcat ) ;_ end of princ ) ;_ end of if (IF (EQ qtdn "Yes") (WRITE-LINE "QUIT Y" fp1) (IF (EQ (LENGTH pltlst) 1) (WRITE-LINE "(if(setq ent (ssget \"X\" (LIST(CONS 410 (GETVAR \"CTAB\"))(CONS 2 \"pltstamp\"))))(entdel(ssname ent 0)))" fp1) (IF (OR (EQ (STRCAT cdwg ".DWG") (FINDFILE (LAST pltlst))) (EQ cdwg (FINDFILE (LAST pltlst))) (EQ (SUBSTR cdwg (- (STRLEN cdwg) 6)) "UNNAMED") ) ;_ end of or (PROGN (WRITE-LINE "(if ent(entdel(ssname ent 0)))" fp1) ) ;_ end of progn (PROGN (WRITE-LINE "(if ent(entdel(ssname ent 0)))" fp1) (WRITE-LINE ".OPEN" fp1) (WRITE-LINE "(if(eq(getvar\"dbmod\")0)(princ)\"Y\")" fp1) (IF (WCMATCH (STRCASE cdwg) "*.DWG") (WRITE-LINE (STRCAT "\"" cdwg "\"") fp1) (WRITE-LINE (STRCAT "\"" cdwg ".DWG\"") fp1) ) ;_ end of if ) ;_ end of progn ) ;_ end of if ) ;_ end of if ) ;if (IF fp1 (CLOSE fp1) ) ;_ end of if (SETQ scrnm (STRCAT pltdir lognm "BPLOT2K")) (IF ukword nil (LOAD "ukword") ) ;_ end of if (SETQ scrnow (ukword 1 "Yes No" (STRCAT "Begin batch plot script \"" scrnm ".SCR\" now? (Yes or No)" ) ;_ end of strcat (IF scrnow scrnow "Yes" ) ;_ end of if ) ;_ end of ukword ) ;_ end of setq (IF (AND plotr (OR (WCMATCH plotr "*8825*") (WCMATCH plotr "*8830*")) (EQ out_to "Fileout") (NOT jstscr) ) ;_ end of and (write-xds (IF frst_dir frst_dir "A\\" ) ;_ end of if ) ;_ end of write-xds ) ;_ end of if (IF (AND plotr (OR (WCMATCH plotr "*8825*") (WCMATCH plotr "*8830*")) (EQ out_to "Fileout") (EQ dblplt "1") (NOT jstscr) ) ;_ end of and (write-xds (IF scnd_dir scnd_dir "B\\" ) ;_ end of IF ) ;_ end of write-xds ) ;_ end of if (IF (AND scrnm (EQ scrnow "Yes")) (COMMAND "_.script" scrnm) (PROGN (rstdir) (PRINC (STRCAT "\nUse the SCRIPT command to run " scrnm ".SCR when ready." ) ;_ end of strcat ) ;_ end of princ ) ;_ end of progn ) ;_ end of if (SETVAR "luprec" bplots2k_luprec) (SETVAR "cmdecho" bplots2k_cmdecho) (SETVAR "expert" bplots2k_expert) (SETVAR "filedia" bplots2k_filedia) (SETVAR "osmode" bplots2k_osmode) (GRAPHSCR) (SETQ *error* pre_bplots2k_error) (PRINC) ) ;_ end of defun ;;;******************************************************************** (DEFUN mkpage2 () (SETQ page2 nil) (SETQ pgcnt 1) (WHILE (AND (/= (TYPE (READ (SUBSTR page1 pgcnt 1))) 'int) (EQ (TYPE (SUBSTR page1 pgcnt 1)) 'str) ) ;_ end of and (SETQ pgcnt (1+ pgcnt)) ) ;_ end of while (SETQ pgcnt1 (1- pgcnt) pg2_1 (SUBSTR page1 1 pgcnt1) ) ;_ end of SETQ (WHILE (EQ (TYPE (READ (SUBSTR page1 pgcnt 1))) 'int) (SETQ pgcnt (1+ pgcnt)) ) ;_ end of while (SETQ pgcnt2 (1- pgcnt) pg2_sz1 (READ (SUBSTR page1 pgcnt1 (- pgcnt pgcnt1))) ) ;_ end of SETQ (IF (EQ (TYPE pg2_sz1) 'int) (SETQ pg2_sza (ITOA pg2_sz1) pg2_sz1 (RTOS (/ pg2_sz1 2.0) 2 0) ) ;_ end of SETQ (SETQ pg2_sz1 "") ) ;_ end of IF (IF (AND (EQ (STRCASE (SUBSTR page1 (+ pgcnt1 3) 1)) "X") (EQ (TYPE (READ (SUBSTR page1 (+ pgcnt1 4) 2))) 'int) ) ;_ end of AND (SETQ pg2_szb (SUBSTR page1 (+ pgcnt1 4) 2) pg2_sz2 (RTOS (/ (READ pg2_szb) 2.0) 2 0 ) ;_ end of RTOS pg2_3 (SUBSTR page1 (+ pgcnt1 6)) ) ;_ end of SETQ (SETQ pg2_sz2 "" pg2_3 "" ) ;_ end of SETQ ) ;_ end of IF (SETQ page2 (STRCAT pg2_1 pg2_sz1 "x" pg2_sz2 pg2_3)) (IF (AND pg2_sza pg2_szb (EQ (TYPE pg2_sza) 'str) (EQ (TYPE pg2_szb) 'str) ) ;_ end of AND (SETQ frst_dir (STRCAT pg2_sza "x" pg2_szb "\\") scnd_dir (STRCAT pg2_sz1 "x" pg2_sz2 "\\") ) ;_ end of SETQ ) ;_ end of IF (IF (MEMBER page2 setupslst) (SETQ found_pg2 T) (SETQ found_pg2 nil) ) ;_ end of IF ) ;_ end of defun ;;;******************************************************************** (DEFUN mkpltdirs () (SETQ dwg_drv (CAR split_fp)) (SETQ plt_dir (SUBSTR (CADR split_fp) 2)) (SETQ strndx 1 prvstrndx 1 dir_lst nil ) ;_ end of SETQ (WHILE (WCMATCH plt_dir "*\\*") (WHILE (WCMATCH (SUBSTR plt_dir strndx) "*\\*") (SETQ strndx (1+ strndx)) ) ;_ end of while (SETQ dir_lst (APPEND (LIST (SUBSTR plt_dir strndx)) dir_lst)) (SETQ prevndx (- strndx 2)) (SETQ strndx 1) (SETQ plt_dir (SUBSTR plt_dir 1 prevndx)) ) ;_ end of while (IF (AND (/= (NTH 1 split_fp) "") (/= (NTH 1 split_fp) "\\")) (SETQ dir_lst (APPEND (LIST (SUBSTR plt_dir strndx)) dir_lst)) (SETQ dir_lst nil) ) ;_ end of if (IF debug_doslib (PRINC "\nDOS_25 ") ) (DOS_DRIVE plt_drv) (DOS_CHDIR "\\") (FOREACH n dir_lst (DOS_MKDIR n) (DOS_CHDIR n) ) ;_ end of foreach (DOS_MKDIR "Plots") (DOS_CHDIR "Plots") ;;; (IF frst_dir NIL (mkpage2) ;;; ) (DOS_MKDIR (IF frst_dir frst_dir "A" ) ;_ end of IF ) ;_ end of DOS_MKDIR (IF (EQ dblplt "1") (DOS_MKDIR (IF scnd_dir scnd_dir "B" ) ;_ end of IF ) ;_ end of DOS_MKDIR ) ;_ end of IF (DOS_DRIVE dwg_drv) (DOS_CHDIR "\\") (DOS_CHDIR (NTH 1 split_fp)) (IF debug_doslib (PRINC "\nDOS_25 ") ) ) ;_ end of defun ;;;******************************************************************** (DEFUN pst_scr () (IF (AND pststr (/= pststr "")) (IF (EQ (SUBSTR pststr 1 8) "filename") (PROGN (SETQ pstfil (FINDFILE (SUBSTR pststr 10))) (IF pstfil (PROGN (SETQ opstf (OPEN pstfil "r")) (WHILE (SETQ pflin (READ-LINE opstf)) (WRITE-LINE pflin fp1) ) ;_ end of while (CLOSE opstf) ) ;_ end of progn ) ;_ end of if ) ;_ end of progn (PROGN ;permits one leading (IF (WCMATCH pststr "\\n*") (PROGN (WRITE-LINE "" fp1) (WRITE-LINE (SUBSTR pststr 3) fp1) ) ;_ end of progn (WRITE-LINE pststr fp1) ) ;_ end of if ;;; THIS NEEDS WORK TO PERMIT MULTIPLE EMBEDDED s ;;; (if (wcmatch pststr "*\n*") ;;; (progn ;;; (setq orig_pststr pststr ;;; pststrlen (strlen pststr) ;;; pstcnt 1 ;;; ) ;;; (while (wcmatch pststr "*\n*") ;;; (setq pststr (substr pststr 1 (- pststrlen pstcnt))) ;;; ) ;;; ) ;;; (write-line pststr fp1) ;;; ) ) ;_ end of progn ) ;_ end of if ) ;_ end of if ) ;_ end of defun ;;;******************************************************************** (DEFUN write-xds (pltlocn /) (IF pltlst (PROGN (IF debug_doslib (PRINC "\nDOS_26 ") ) (SETQ pltsplit (DOS_SPLITPATH (CAR pltlst))) (IF debug_doslib (PRINC "\nDOS_26 ") ) (IF (AND (SETQ xds-file (OPEN (STRCAT plt_drv (CADR pltsplit) "Plots\\" pltlocn (CADDR pltsplit) ".xds" ) ;_ end of STRCAT "w" ) ;_ end of OPEN ) ;_ end of SETQ job_number ) ;_ end of AND (PROGN (WRITE-LINE "[JOB]" xds-file) (WRITE-LINE "VERSION=4" xds-file) (WRITE-LINE (STRCAT "NAME=" (ITOA (LENGTH pltlst)) " " (SUBSTR pltlocn 1 (1- (STRLEN pltlocn))) " Plots, " (CADDR (DOS_SPLITPATH (CAR pltlst))) " to " (CADDR (DOS_SPLITPATH (LAST pltlst))) ) ;_ end of strcat xds-file ) ;_ end of write-line (WRITE-LINE (STRCAT "ACCOUNT=" (RTOS job_number 2 1)) xds-file ) ;_ end of WRITE-LINE (WRITE-LINE "COPIES=1" xds-file) (WRITE-LINE "PRIORITY=5" xds-file) (WRITE-LINE "COLLATION=TRUE" xds-file) (WRITE-LINE "BANNER=FALSE" xds-file) (WRITE-LINE "MEDIAMISMATCH=SCALE" xds-file) (WRITE-LINE "PLOTNESTING=OFF" xds-file) (WRITE-LINE "PAGECOMPENABLE=FALSE" xds-file) (WRITE-LINE "PAGECOMPPAPER=ANSI_E" xds-file) (WRITE-LINE "PAGECOMPMEDIATYPE=ANY" xds-file) (WRITE-LINE "PAGECOMPMEDIASOURCE=AUTO" xds-file) (WRITE-LINE "FOLDER=BYPASS" xds-file) (WRITE-LINE "FOLDING=BYPASS" xds-file) (WRITE-LINE (STRCAT "FILECOUNT=" (RTOS (LENGTH pltlst) 2 0)) xds-file ) ;_ end of WRITE-LINE (WRITE-LINE "" xds-file) (WRITE-LINE "[LABEL]" xds-file) (WRITE-LINE "LABELUSED=FALSE" xds-file) (WRITE-LINE "LABELSTRING=" xds-file) (WRITE-LINE "LABELFONT=HP Stick Font" xds-file) (WRITE-LINE "LABELSIZE=14" xds-file) (WRITE-LINE "LABELROTATE=90" xds-file) (WRITE-LINE "LABELSHADING=100" xds-file) (WRITE-LINE "LABELLOCX=TRAILING" xds-file) (WRITE-LINE "LABELABSX=0.0000" xds-file) (WRITE-LINE "LABELLOCY=BOTTOM" xds-file) (WRITE-LINE "LABELABSY=0.0000" xds-file) (WRITE-LINE "LABELUNITS=INCH" xds-file) (WRITE-LINE "" xds-file) (WRITE-LINE "[STAMP]" xds-file) (WRITE-LINE "VERSION=1" xds-file) (WRITE-LINE "STAMPUSED=FALSE" xds-file) (WRITE-LINE "RASTERID=" xds-file) (WRITE-LINE "RASTERSCALEMODE=RELATIVE" xds-file) (WRITE-LINE "RASTERSCALING=100" xds-file) (WRITE-LINE "RASTERROTATE=90" xds-file) (WRITE-LINE "RASTERLOCX=CENTER" xds-file) (WRITE-LINE "RASTERABSX=0.0000" xds-file) (WRITE-LINE "RASTERLOCY=CENTER" xds-file) (WRITE-LINE "RASTERABSY=0.0000" xds-file) (WRITE-LINE "STAMPUNITS=INCH" xds-file) (WRITE-LINE "" xds-file) (SETQ pltcnt 0) (FOREACH n pltlst (IF debug_doslib (PRINC "\nDOS_27 ") ) (SETQ xds_split (DOS_SPLITPATH n)) (IF debug_doslib (PRINC "\nDOS_27 ") ) (WRITE-LINE (STRCAT "[FILE" (COND ((EQ pltcnt 0) "000") ((< pltcnt 10) (STRCAT "00" (ITOA pltcnt))) ((< pltcnt 100) (STRCAT "0" (ITOA pltcnt))) ((< pltcnt 1000) (ITOA pltcnt)) ) ;_ end of COND "]" ) ;_ end of strcat xds-file ) ;_ end of write-line (WRITE-LINE "VERSION=3" xds-file) (WRITE-LINE (IF (OR (WCMATCH (CADR split_fp) "* *") (WCMATCH (CADDR split_fp) "* *") ) ;_ end of OR (STRCAT "FILEPATH=" "\"" plt_drv (CADR xds_split) "Plots\\" pltlocn (CADDR xds_split) ".plt\"" ) ;_ end of strcat (STRCAT "FILEPATH=" plt_drv (CADR xds_split) "Plots\\" pltlocn (CADDR xds_split) ".plt" ) ;_ end of strcat ) ;_ end of IF xds-file ) ;_ end of write-line (WRITE-LINE "PDL=AUTO" xds-file) (WRITE-LINE "MEDIASOURCE=AUTO" xds-file) (WRITE-LINE "MEDIASIZE=ANY" xds-file) (WRITE-LINE "MEDIATYPE=PAPER" xds-file) (WRITE-LINE "SCALINGTYPE=DISABLED" xds-file) (WRITE-LINE "SCALINGPERCENT=100" xds-file) (WRITE-LINE "AUTOROTATE=TRUE" xds-file) (WRITE-LINE "ROTATION=0" xds-file) (WRITE-LINE "JUSTTYPEX=CENTER" xds-file) (WRITE-LINE "JUSTDISTX=0.0000" xds-file) (WRITE-LINE "JUSTTYPEY=CENTER" xds-file) (WRITE-LINE "JUSTDISTY=0.0000" xds-file) (WRITE-LINE "JUSTUNITS=INCH" xds-file) (WRITE-LINE "MIRRORX=FALSE" xds-file) (WRITE-LINE "MIRRORY=FALSE" xds-file) (WRITE-LINE "" xds-file) (WRITE-LINE (STRCAT "[LABEL" (COND ((EQ pltcnt 0) "000") ((< pltcnt 10) (STRCAT "00" (ITOA pltcnt))) ((< pltcnt 100) (STRCAT "0" (ITOA pltcnt))) ((< pltcnt 1000) (ITOA pltcnt)) ) ;_ end of COND "]" ) ;_ end of strcat xds-file ) ;_ end of write-line (WRITE-LINE "LABELUSED=FALSE" xds-file) (WRITE-LINE "LABELSTRING=" xds-file) (WRITE-LINE "LABELFONT=HP Stick Font" xds-file) (WRITE-LINE "LABELSIZE=14" xds-file) (WRITE-LINE "LABELROTATE=90" xds-file) (WRITE-LINE "LABELSHADING=100" xds-file) (WRITE-LINE "LABELLOCX=TRAILING" xds-file) (WRITE-LINE "LABELABSX=0.0000" xds-file) (WRITE-LINE "LABELLOCY=BOTTOM" xds-file) (WRITE-LINE "LABELABSY=0.0000" xds-file) (WRITE-LINE "LABELUNITS=INCH" xds-file) (WRITE-LINE "" xds-file) (WRITE-LINE (STRCAT "[STAMP" (COND ((EQ pltcnt 0) "000") ((< pltcnt 10) (STRCAT "00" (ITOA pltcnt))) ((< pltcnt 100) (STRCAT "0" (ITOA pltcnt))) ((< pltcnt 1000) (ITOA pltcnt)) ) ;_ end of COND "]" ) ;_ end of strcat xds-file ) ;_ end of write-line (WRITE-LINE "VERSION=1" xds-file) (WRITE-LINE "STAMPUSED=FALSE" xds-file) (WRITE-LINE "RASTERID=" xds-file) (WRITE-LINE "RASTERSCALEMODE=RELATIVE" xds-file) (WRITE-LINE "RASTERSCALING=100" xds-file) (WRITE-LINE "RASTERROTATE=90" xds-file) (WRITE-LINE "RASTERLOCX=CENTER" xds-file) (WRITE-LINE "RASTERABSX=0.0000" xds-file) (WRITE-LINE "RASTERLOCY=CENTER" xds-file) (WRITE-LINE "RASTERABSY=0.0000" xds-file) (WRITE-LINE "STAMPUNITS=INCH" xds-file) (WRITE-LINE "" xds-file) (WRITE-LINE (STRCAT "[PAGECOMP" (COND ((EQ pltcnt 0) "000") ((< pltcnt 10) (STRCAT "00" (ITOA pltcnt))) ((< pltcnt 100) (STRCAT "0" (ITOA pltcnt))) ((< pltcnt 1000) (ITOA pltcnt)) ) ;_ end of COND "]" ) ;_ end of strcat xds-file ) ;_ end of write-line (WRITE-LINE "VERSION=1" xds-file) (WRITE-LINE "PAGECOMPSIZE=ANY" xds-file) (WRITE-LINE "PAGECOMPSCALE=FALSE" xds-file) (WRITE-LINE "PAGECOMPROTATE=0" xds-file) (WRITE-LINE "PAGECOMPPOSX=0.0000" xds-file) (WRITE-LINE "PAGECOMPPOSY=0.0000" xds-file) (WRITE-LINE "PAGECOMPUNITS=INCH" xds-file) (WRITE-LINE "" xds-file) (SETQ pltcnt (1+ pltcnt)) ) ;_ end of foreach (CLOSE xds-file) (PRINC (STRCAT "\nXDS File " plt_drv (CADR pltsplit) "Plots\\" pltlocn (CADDR pltsplit) ".xds created! " ) ;_ end of STRCAT ) ;_ end of PRINC (PRINC) ) ;_ end of PROGN (PRINC "\nUnable to create XDS file! ") ) ;_ end of IF ) ;_ end of PROGN ) ;_ end of IF (PRINC) ) ;_ end of DEFUN ;;;******************************************************************** (DEFUN c:itt () (SETQ laylist (DICTSEARCH (NAMEDOBJDICT) "ACAD_LAYOUT")) (SETQ index 0) (WHILE (AND (/= (CDR (NTH index laylist)) "Layout1") (/= (NTH index laylist) nil) ) ;_ end of and (SETQ index (+ index 1)) (IF (NTH (+ index 1) laylist) (SETQ modellist (ENTGET (CDR (NTH (+ index 1) laylist)))) ) ;_ end of if ) ;_ end of while ) ;_ end of defun (DEFUN wait_spin () (PRINC (STRCAT "\010" waitic)) (PRINC) (COND ((AND (EQ waitic "|") (EQ ticsid 1)) (SETQ waitic "/")) ((EQ waitic "/") (SETQ waitic "-" ticsid 2 ) ;_ end of setq ) ((EQ waitic "-") (SETQ waitic "|")) ((AND (EQ waitic "|") (EQ ticsid 2)) (SETQ waitic "\\")) ((EQ waitic "\\") (SETQ waitic "|" ticsid 1 ) ;_ end of setq ) ) ;_ end of cond ) ;_ end of defun (DEFUN c:curplts () (SETQ curpltsfolder (STRCAT (GETVAR "dwgprefix") "Plots\\")) (IF debug_doslib (PRINC "\nDOS_28 ") ) (SETQ curplts_split (DOS_SPLITPATH curpltsfolder)) (IF debug_doslib (PRINC "\nDOS_28 ") ) ;;; (dos_drive (car curplts_split)) ;;; (dos_chdir "\\") ;;; (dos_chdir curpltsfolder) (STARTAPP "explorer" curpltsfolder) (PRINC) ) ;_ end of defun (DEFUN batlayplt ( ;;; plot_device ;;; plot_paper_size ;;; plot_units ;;; plot_orientation ;;; plot_upside_down ;;; plot_area ;;; plot_view_name ;;; plot_window_llcor ;;; plot_window_urcor ;;; plot_scale ;;; plot_offset ;;; plot_with_style ;;; plot_table_file ;;; plot_std_answers ;;; plot_dwgfilepath ;;; plot_save_setup / ) (SETVAR "CMDECHO" 1) (SETQ layout_count 1) (WHILE (< layout_count (LENGTH (LAYOUTLIST))) (SETQ plot_layout (NTH layout_count (LAYOUTLIST))) (SETVAR "CTAB" plot_layout) (IF debug_doslib (PRINC "\nDOS_29 ") ) (SETQ dwg_split_fp (DOS_SPLITPATH (STRCAT (GETVAR "dwgprefix") (GETVAR "dwgname")) ) ;_ end of DOS_SPLITPATH plot_dwgfilepath (IF (OR (WCMATCH (CADR dwg_split_fp) "* *") (WCMATCH (CADDR dwg_split_fp) "* *") ) ;_ end of OR (STRCAT "\"" plt_drv (CADR dwg_split_fp) "Plots\\" (IF frst_dir frst_dir "A\\" ) ;_ end of IF (CADDR split_fp) "-" plot_layout ".plt\"" ) ;_ end of strcat (STRCAT plt_drv (CADR split_fp) "Plots\\" (IF frst_dir frst_dir "A\\" ) ;_ end of IF (CADDR split_fp) "-" plot_layout ".plt" ) ;_ end of strcat ) ;_ end of IF ) ;_ end of SETQ (IF debug_doslib (PRINC "\nDOS_29 ") ) (COMMAND ".-PLOT" "Yes" plot_layout ;layout name ) ;_ end of COMMAND (COND ((WCMATCH (STRCASE plot_device) "*ADOBE PDF*") (COMMAND plot_device ;device plot_paper_size ;paper size plot_units ;units plot_orientation ;orientation plot_upside_down ;upside down? ) ;_ end of COMMAND ;_ end of COMMAND ;_ end of COMMAND ;_ end of COMMAND ) (T (COMMAND plot_device ;device plot_paper_size ;paper size plot_orientation ;orientation plot_upside_down ;upside down? ) ;_ end of COMMAND ) ) ;_ end of COND (COND ;plot area [Display/Extents/Limits/View/Window] ((EQ plot_area "Display") (COMMAND "Display")) ((EQ plot_area "Extents") (COMMAND "Extents")) ((EQ plot_area "Limits") (COMMAND "Window" (GETVAR "limmin") ;(solves random plot limits bug) (GETVAR "limmax") ) ;_ end of COMMAND ) ((EQ plot_area "View") (COMMAND "View" plot_view_name)) ((EQ plot_area "Window") (COMMAND "Window" (EVAL (READ plot_window_llcor)) (EVAL (READ plot_window_urcor)) ) ;_ end of COMMAND ) ) ;_ end of COND (COMMAND plot_scale ;plot scale plot_offset ;plot offset plot_with_style ;plot w/ plot styles? plot_table_file ;style table file plot_with_lineweights ;plot w/ plot lineweights? plot_scale_lineweights ;scale lineweights with plot scale? plot_paper_first ;plot paper space first? plot_hide_paper ;hide paper space objects? plot_dwgfilepath plot_save_setup ;save to page setup? plot_proceed ;proceed with plot? ) ;_ end of COMMAND ;_ end of COMMAND ;_ end of COMMAND ;_ end of COMMAND ;_ end of COMMAND (SETQ layout_count (1+ layout_count)) ) ;_ end of WHILE ) ;_ end of DEFUN (PRINC) ;|«Visual LISP© Format Options» (72 2 40 2 T "end of " 60 9 2 1 0 nil T nil T) ***Don't add text below the comment!***|;