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

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