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

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