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

(IF (/= SET14 NIL)
    (PROGN
       (SETQ FC (OPEN "/ACAD/HON/SET/SET14.SET" "r"))
       (SETQ SETL14 (READ-LINE FC))
       (IF (OR (= SETL14 "") (= SETL14 NIL))
           (CLOSE FC)
       )
       (IF (OR (= SETL14 "") (= SETL14 NIL))
           (PROGN
              (PROMPT "\nPLEASE SETTING LAYER:" )
              (SETQ FC (OPEN "/ACAD/HON/SET/SET14.SET" "w"))
              (setq SETL14 (GETSTRING T"\nSETTING LAYER ? <14>:"))
              (IF (= SETL14 "")
                  (WRITE-LINE "14" FC)
                  (WRITE-LINE SETL14 FC)
              )
           (CLOSE FC)
           )
       )
       (SETQ FC (OPEN "/ACAD/HON/SET/SET14.SET" "r"))
       (SETQ SETL14 (READ-LINE FC))
       (CLOSE FC)
       (PROMPT "\nLAYER NAME IS:" )(PROMPT SETL14)(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/SET14.SET" "w"))
       (PROMPT "\nLAYER IS " )(PROMPT "<")(PROMPT SETL14) (PROMPT ">:")
       (SETQ SETW14 SETL14)
       (setq SETL14 (GETSTRING T))
       (IF (OR (= SETL14 "") (= SETL14 NIL))
               (WRITE-LINE SETW14 FC)
               (WRITE-LINE SETL14 FC)
       )
       (CLOSE FC)
       (SETQ FC (OPEN "/ACAD/HON/SET/SET14.SET" "r"))
       (SETQ SETL14 (READ-LINE FC))
       (CLOSE FC)
       (PROMPT "\nLAYER NOW IS:" )(PROMPT SETL14)(TERPRI)
  )
)
