;;D
(defun c:OD()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-D" "f" "*" "t" "MM,GG,WIR,mark" ""))
(defun c:FD()(command "-layer" "freeze" "-D,-DDIM"  ""))
(defun c:TD()(command "-layer" "T" "-D,MM,GG,WIR,mark"  "ON" "-D,MM,GG,WIR,mark" ""))	
(defun c:SD()(command "-layer" "t" "-d,MM,GG,WIR,mark" "S" "-D"  ""))             
(defun c:ED()(command "-layer" "E" "-D"  ""))
(defun c:COD(/ a)
    (setq a (ssget))
    (command "copy" a "" "0,0" "0,0")
    (command "change" a "" "p" "la" "-D" ""))
(defun c:CHD(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-D" ""))

;;DDIM
(defun c:ODM()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-DDIM" "f" "*" ""))
(defun c:FDM()(command "-layer" "OFF" "-DDIM"  ""))
(defun c:SDM()(command "-layer" "t" "-ddim" "S" "-DDIM"  ""))
(defun c:TDM()(command "-layer" "T" "-DDIM"  "ON" "-DDIM" ""))
(defun c:CHDM(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-DDIM" ""))

;Db
(defun c:Odb()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-db" "f" "*" "t" "MM,GG,WIR,mark" ""))
(defun c:Fdb()(command "-layer" "freeze" "-db,-dbIM"  ""))
(defun c:Tdb()(command "-layer" "T" "-db,MM,GG,WIR,mark"  "ON" "-db,MM,GG,WIR,mark" ""))	
(defun c:Sdb()(command "-layer" "t" "-db,MM,GG,WIR,mark" "S" "-db"  ""))
(defun c:Edb()(command "-layer" "E" "-db"  ""))
(defun c:COdb(/ a)
    (setq a (ssget))
    (command "copy" a "" "0,0" "0,0")
    (command "change" a "" "p" "la" "-db" ""))
(defun c:CHdb(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-db" ""))

;;D1
(defun c:OD1()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-D1" "f" "*" "t" "MM,GG,WIR,mark" ""))
(defun c:FD1()(command "-layer" "freeze" "-D1,-D1DIM"  ""))
(defun c:TD1()(command "-layer" "T" "-D1,MM,GG,WIR,mark"  "ON" "-D1,MM,GG,WIR,mark" ""))	
(defun c:SD1()(command "-layer" "t" "-d1,MM,GG,WIR,mark" "S" "-D1"  ""))
(defun c:ED1()(command "-layer" "E" "-D1"  ""))
(defun c:COD1(/ a)
    (setq a (ssget))
    (command "copy" a "" "0,0" "0,0")
    (command "change" a "" "p" "la" "-D1" ""))
(defun c:CHD1(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-D1" ""))

;;D1DIM
(defun c:OD1M()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-D1DIM" "f" "*" ""))
(defun c:FD1M()(command "-layer" "OFF" "-D1DIM"  ""))
(defun c:SD1M()(command "-layer" "t" "-d1dim" "S" "-D1DIM"  ""))
(defun c:TD1M()(command "-layer" "T" "-D1DIM"  "ON" "-D1DIM" ""))
(defun c:CHD1M(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-D1DIM" ""))


;;D2
(defun c:OD2()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-D2" "f" "*" "t" "MM,GG,WIR,mark" ""))
(defun c:FD2()(command "-layer" "freeze" "-D2,-D1DIM"  ""))
(defun c:TD2()(command "-layer" "T" "-D2,MM,GG,WIR,mark"  "ON" "-D2,MM,GG,WIR,mark" ""))	
(defun c:SD2()(command "-layer" "t" "-d2,MM,GG,WIR,mark" "S" "-D2"  ""))
(defun c:ED2()(command "-layer" "E" "-D2"  ""))
(defun c:COD2(/ a)
    (setq a (ssget))
    (command "copy" a "" "0,0" "0,0")
    (command "change" a "" "p" "la" "-D2" ""))
(defun c:CHD2(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-D2" ""))

;;D2DIM
(defun c:OD2M()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-D2DIM" "f" "*" ""))
(defun c:FD2M()(command "-layer" "OFF" "-D2DIM"  ""))
(defun c:SD2M()(command "-layer" "t" "-d1dim" "S" "-D2DIM"  ""))
(defun c:TD2M()(command "-layer" "T" "-D1DIM"  "ON" "-D2DIM" ""))
(defun c:CHD2M(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-D2DIM" ""))


;;CB
(defun c:OCB()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-CB" "f" "*" "t" "MM,GG,WIR,mark" ""))
(defun c:FCB()(command "-layer" "freeze" "-CB,-CBDIM"  ""))
(defun c:TCB()(command "-layer" "T" "-CB,MM,GG,WIR,mark"  "ON" "-CB,MM,GG,WIR,mark" ""))	
(defun c:SCB()(command "-layer" "t" "-cb,MM,GG,WIR,mark" "S" "-CB"  ""))
(defun c:ECB()(command "-layer" "E" "-CB"  ""))
(defun c:COCB(/ a)
    (setq a (ssget))
    (command "copy" a "" "0,0" "0,0")
    (command "change" a "" "p" "la" "-CB" ""))
(defun c:CHCB(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-CB" ""))

;;CBDIM
(defun c:OCBM()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-cbDIM" "f" "*" ""))
(defun c:FCBM()(command "-layer" "OFF" "-DDIM"  ""))
(defun c:SCBM()(command "-layer" "t" "-cbdim" "S" "-cbDIM"  ""))
(defun c:TCBM()(command "-layer" "T" "-cbDIM"  "ON" "-cbDIM" ""))
(defun c:CHCBM(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-CBDIM" ""))


;;DD
(defun c:ODD()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-DD" "f" "*" "t" "MM,GG,WIR,mark" ""))
(defun c:FDD()(command "-layer" "freeze" "-DD,-DDDIM"  ""))
(defun c:TDD()(command "-layer" "T" "-DD,MM,GG,WIR,mark"  "ON" "-DD,MM,GG,WIR,mark" ""))	
(defun c:SDD()(command "-layer" "t" "-dd,MM,GG,WIR,mark" "S" "-DD"  ""))
(defun c:EDD()(command "-layer" "E" "-DD"  ""))
(defun c:CODD(/ a)
    (setq a (ssget))
    (command "copy" a "" "0,0" "0,0")
    (command "change" a "" "p" "la" "-DD" ""))
(defun c:CHDD(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-DD" ""))

;;DDDIM
(defun c:ODDM()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-DDdim" "f" "*" ""))
(defun c:FDDM()(command "-layer" "OFF" "-DDDIM"  ""))
(defun c:TDDM()(command "-layer" "T" "-DDDIM"  "ON" "-DDDIM" ""))	
(defun c:SDDM()(command "-layer" "t" "-dddim" "S" "-DDDIM"  ""))
(defun c:CHDDM(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-DDDIM" ""))

