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

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