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

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