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

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