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

(IF (/= SET8 NIL)
    (PROGN
       (SETQ FC (OPEN "/acad/hon/SET/SET8.SET" "r"))
       (SETQ SETL8 (READ-LINE FC))
       (IF (OR (= SETL8 "") (= SETL8 NIL))
           (CLOSE FC)
       )
       (IF (OR (= SETL8 "") (= SETL8 NIL))
           (PROGN
              (PROMPT "\nPLEASE SETTING LAYER:" )
              (SETQ FC (OPEN "/acad/hon/SET/SET8.SET" "w"))
              (setq SETL8 (GETSTRING T"\nSETTING LAYER ? <8>:"))
              (IF (= SETL8 "")
                  (WRITE-LINE "8" FC)
                  (WRITE-LINE SETL8 FC)
              )
           (CLOSE FC)
           )
       )
       (SETQ FC (OPEN "/acad/hon/SET/SET8.SET" "r"))
       (SETQ SETL8 (READ-LINE FC))
       (CLOSE FC)
       (PROMPT "\nLAYER NAME IS:" )(PROMPT SETL8)(TERPRI)
       (COMMAND "LAYER" "S" SETL8 "")
    )
)
