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

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