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

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