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

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