(setq p001 nil
      p002 nil
)
(setq gcwzb nil)
(setq cad "2000")
(setq plotstyle "other")
(defun c:pf ()
  (setq	ff
	 (open
	   "C:/gees2000/福建省第四地质大队岩土工程勘察专家系统/geescad/print2000.lsp"
	   "r"
	 )
  )
  (setq b "\n")
  (setq	a nil
	j 0
  )
  (while (< j 1000)			;while1
    (setq a (read-line ff))
    (if	(/= a nil)			;if2
      (setq b (strcat b "\n" a)
	    j 0
      )
      (setq j (1+ j))
    )					;if2
  )					;end while1
  (close ff)

  (setq pmtA4 (getstring "printpmtA4:"))
  (setq zztA4 (getstring "printzztA4:"))
  (setq other (getstring "printother:"))
  (setq b (strcat b "\n" pmtA4 ")" "\n" "((= plotstyle \"zztA4\")"))
  (setq b (strcat b "\n" zztA4 ")" "\n" "((= plotstyle \"other\")"))
  (setq b (strcat b "\n" other ")))"))

  (setq c b)

  (setq	ff
	 (open
	   "C:/gees2000/福建省第四地质大队岩土工程勘察专家系统/geescad/acad2000.lsp"
	   "w"
	 )
  )
  (princ c ff)
  (close ff)
)					; MODULE_ID ACAD2000_LSP_
;;;    ACAD2000.LSP Version 1.0 for AutoCAD 2000
;;;
;;;    Copyright (C) 1994-1999 by Autodesk, Inc.
;;;
;;;    Permission to use, copy, modify, and distribute this software
;;;    for any purpose and without fee is hereby granted, provided
;;;    that the above copyright notice appears in all copies and
;;;    that both that copyright notice and the limited warranty and
;;;    restricted rights notice below appear in all supporting
;;;    documentation.
;;;
;;;    AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
;;;    AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
;;;    MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE.  AUTODESK, INC.
;;;    DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
;;;    UNINTERRUPTED OR ERROR FREE.
;;;
;;;    Use, duplication, or disclosure by the U.S. Government is subject to
;;;    restrictions set forth in FAR 52.227-19 (Commercial Computer
;;;    Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) 
;;;    (Rights in Technical Data and Computer Software), as applicable.
;;;
;;;.
;;;
;;;    Note:
;;;            This file is normally loaded only once per AutoCAD session.
;;;            If you wish to have LISP code loaded into every document,
;;;            you should add your code to acaddoc.lsp.

;;;
;;;    Globalization Note:   
;;;            We do not support autoloading applications by the native 
;;;            language command call (e.g. with the leading underscore
;;;            mechanism.)

(if (not (= (substr (ver) 1 11) "Visual LISP"))
  (load "acad2000doc.lsp")
)


;;  Remove this line if you won't be using the legacy
;;  DWFOUT command and want to maximize available memory.
(vl-load-all "support\\legacy\\dwfout\\dwfout.lsp")

;; Silent load.
(princ)


(SETQ plotstyle "other")
(defun c:p ()
  (setq p1 (list (- (car p001) 0.2) (- (cadr p001) 0.2)))
  (setq p2 (list (+ (car p002) 0.2) (+ (cadr p002) 0.2)))
  (setq	l1 (- (car p2) (car p1)-2)
	l2 (- (cadr p2) (cadr p1)-2)
  )
  (setq	pagesize (strcat "最小纸张  长："
			 (rtos l1)
			 "cm、"
			 "宽："
			 (rtos l2)
			 "cm。 OK?"
		 )
  )
  (setq pagesize (getstring pagesize))
  (command "_.zoom" "e")
  (cond
        ((= plotstyle "zztA4")

