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

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