DEFUN C:SET11
;SET LAYER
(COMMAND "SETVAR" "CMDECHO" 0)
;(IF (= (TYPE F1) 'FILE ) "YES"  (STOP))
;(IF (= (TYPE F2) 'FILE ) "YES" (STOP))
(setq SET11 (findfile "/ACAD/HON/SET/SET11.SET"))
(IF (= SET11 NIL)
    (PROGN
       (PROMPT "\nPLEASE SETTING LAYER:" )
       (SETQ FC (OPEN "/ACAD/HON/SET/SET11.SET" "w"))
       (setq SETL11 (GETSTRING T"\nSETTING LAYER ? <11>:"))
       (IF (OR (= SETL11 "") (= SETL11 NIL))
              (WRITE-LINE "11" FC)
              (WRITE-LINE SETL11 FC)
       )
       (CLOSE FC)
    )
)

(IF (/= SET11 NIL)
    (PROGN
       (SETQ FC (OPEN "/ACAD/HON/SET/SET11.SET" "r"))
       (SETQ SETL11 (READ-LINE FC))
       (IF (OR (= SETL11 "") (= SETL11 NIL))
           (CLOSE FC)
       )
       (IF (OR (= SETL11 "") (= SETL11 NIL))
           (PROGN
              (PROMPT "\nPLEASE SETTING LAYER:" )
              (SETQ FC (OPEN "/ACAD/HON/SET/SET11.SET" "w"))
              (setq SETL11 (GETSTRING T"\nSETTING LAYER ? <11>:"))
              (IF (= SETL11 "")
                  (WRITE-LINE "11" FC)
                  (WRITE-LINE SETL11 FC)
              )
           (CLOSE FC)
           )
       )
       (SETQ FC (OPEN "/ACAD/HON/SET/SET11.SET" "r"))
       (SETQ SETL11 (READ-LINE FC))
       (CLOSE FC)
       (PROMPT "\nLAYER NAME IS:" )(PROMPT SETL11)(TERPRI)
    )
)

(SETQ ANS (strcase (GETSTRING "\nDO YOU WANT TO CHANGE LAST SETTING <Y/N> N:")))
(IF (= ANS "Y")
    (PROGN
       (PROMPT "\nPLEASE SETTING LAYER:" )
       (SETQ FC (OPEN "/ACAD/HON/SET/SET11.SET" "w"))
       (PROMPT "\nLAYER IS " )(PROMPT "<")(PROMPT SETL11) (PROMPT ">:")
       (SETQ SETW11 SETL11)
       (setq SETL11 (GETSTRING T))
       (IF (OR (= SETL11 "") (= SETL11 NIL))
               (WRITE-LINE SETW11 FC)
               (WRITE-LINE SETL11 FC)
       )
       (CLOSE FC)
       (SETQ FC (OPEN "/ACAD/HON/SET/SET11.SET" "r"))
       (SETQ SETL11 (READ-LINE FC))
       (CLOSE FC)
       (PROMPT "\nLAYER NOW IS:" )(PROMPT SETL11)(TERPRI)
  )
)
