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

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