;;HC
(defun c:Ohc()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-hc" "f" "*" "t" "MM,GG,WIR,mark" ""))
(defun c:Fhc()(command "-layer" "freeze" "-HC,-HCDIM" ""))
(defun c:Thc()(command "-layer" "T" "-HC,MM,GG,WIR,mark" "ON" "-HC,MM,GG,WIR,mark" ""))	
(defun c:Shc()(command "-layer" "t" "-hc,MM,GG,WIR,mark" "S" "-HC"  ""))
(defun c:Ehc()(command "-layer" "E" "-HC"  ""))
(defun c:COHC(/ a)
    (setq a (ssget))
    (command "copy" a "" "0,0" "0,0")
    (command "change" a "" "p" "la" "-HC" ""))
(defun c:CHHC(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-HC" ""))

;;HCDIM
(defun c:OhcM()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-hcDIM" "f" "*"  ""))
(defun c:FhcM()(command "-layer" "off" "-HCDIM"  ""))
(defun c:ThcM()(command "-layer" "T" "-HCDIM"  "ON" "-HCDIM" ""))	
(defun c:ShcM()(command "-layer" "t" "-hcdim" "S" "-HCDIM"  ""))
(defun c:CHHCM(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-HCDIM" ""))

;;HH
(defun c:OHH()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-hh" "f" "*" "t" "MM,GG,WIR,mark" ""))
(defun c:FHH()(command "-layer" "freeze" "-HH,-HHDIM"  ""))
(defun c:THH()(command "-layer" "T" "-HH,MM,GG,WIR,mark"  "ON" "-HH,MM,GG,WIR,mark" ""))	
(defun c:SHH()(command "-layer" "t" "-hh,MM,GG,WIR,mark" "S" "-HH"  ""))
(defun c:EHH()(command "-layer" "E" "-HH"  ""))
(defun c:COHH(/ a)
    (setq a (ssget))
    (command "copy" a "" "0,0" "0,0")
    (command "change" a "" "p" "la" "-HH" ""))
(defun c:CHHH(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-HH" ""))


;;HHDIM
(defun c:OHHM()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-HHDIM" "f" "*"  ""))
(defun c:FHHM()(command "-layer" "OFF" "-HHDIM"  ""))
(defun c:THHM()(command "-layer" "T" "-HHDIM"  "ON" "-HHDIM" ""))	
(defun c:SHHM()(command "-layer" "t" "-hcdim" "S" "-HHDIM"  ""))
(defun c:CHHHM(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-HHDIM" ""))


;;BP          
(defun c:OBP()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-BP" "f" "*" "t" "MM,GG,WIR,mark" ""))
(defun c:FBP()(command "-layer" "freeze" "-BP,-BPDIM"  ""))
(defun c:TBP()(command "-layer" "T" "-BP,MM,GG,WIR,mark"  "ON" "-BP,MM,GG,WIR" ""))	
(defun c:SBP()(command "-layer" "t" "-bp,MM,GG,WIR,mark" "S" "-BP"  ""))
(defun c:EBP()(command "-layer" "E" "-BP"  ""))
(defun c:COBP(/ a)
    (setq a (ssget))
    (command "copy" a "" "0,0" "0,0")
    (command "change" a "" "p" "la" "-BP" ""))
(defun c:CHBP(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-BP" ""))

;;BPDIM
(defun c:OBPM()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-BPDIM" "f" "*"  ""))
(defun c:FBPM()(command "-layer" "OFF" "-BPDIM"  ""))
(defun c:TBPM()(command "-layer" "T" "-BPDIM"  "ON" "-BPDIM" ""))	
(defun c:SBPM()(command "-layer" "t" "-bpdim" "S" "-BPDIM"  ""))
(defun c:CHBPM(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-BPDIM" ""))


;;PP
(defun c:OPP()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-PP" "f" "*" "t" "MM,GG,WIR,mark" ""))
(defun c:FPP()(command "-layer" "freeze" "-PP,-PPDIM"  ""))
(defun c:TPP()(command "-layer" "T" "-PP,MM,GG,WIR,mark"  "ON" "-PP,MM,GG,WIR,mark" ""))	
(defun c:SPP()(command "-layer" "t" "-pp,MM,GG,WIR,mark" "S" "-PP"  ""))
(defun c:EPP()(command "-layer" "E" "-PP"  ""))
(defun c:COPP(/ a)
    (setq a (ssget))
    (command "copy" a "" "0,0" "0,0")
    (command "change" a "" "p" "la" "-PP" ""))
(defun c:CHPP(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-PP" ""))

;;PPDIM
(defun c:OPPM()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-PPDIM" "f" "*"  ""))
(defun c:FPPM()(command "-layer" "freeze" "-PPDIM"  ""))
(defun c:TPPM()(command "-layer" "T" "-PPDIM"  "ON" "-PPDIM" ""))	
(defun c:SPPM()(command "-layer" "t" "-ppdim" "S" "-PPDIM"  ""))
(defun c:CHPPM(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-PPDIM" ""))

;;pb
(defun c:Opb()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-pb" "f" "*" "t" "MM,GG,WIR,mark" ""))
(defun c:Fpb()(command "-layer" "freeze" "-pb,-pbDIM"  ""))
(defun c:Tpb()(command "-layer" "T" "-pb,MM,GG,WIR,mark"  "ON" "-pb,MM,GG,WIR,mark" ""))	
(defun c:Spb()(command "-layer" "t" "-pb,MM,GG,WIR,mark" "S" "-pb"  ""))
(defun c:Epb()(command "-layer" "E" "-pb"  ""))
(defun c:COpb(/ a)
    (setq a (ssget))
    (command "copy" a "" "0,0" "0,0")
    (command "change" a "" "p" "la" "-pb" ""))
(defun c:CHpb(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-pb" ""))

;;B
(defun c:OB()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-B" "f" "*" "t" "MM,GG,WIR,mark" ""))
(defun c:FB()(command "-layer" "freeze" "-B,-BDIM"  ""))
(defun c:TB()(command "-layer" "T" "-B,MM,GG,WIR,mark"  "ON" "-B,MM,GG,WIR,mark" ""))	
(defun c:SB()(command "-layer" "t" "-b,MM,GG,WIR,mark" "S" "-B"  ""))
(defun c:EB()(command "-layer" "E" "-B"  ""))
(defun c:COB(/ a)
    (setq a (ssget))
    (command "copy" a "" "0,0" "0,0")
    (command "change" a "" "p" "la" "-B" ""))
(defun c:CHB(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-B" ""))

;;BDIM
(defun c:OBM()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-BDIM" "f" "*"  ""))
(defun c:FBM()(command "-layer" "OFF" "-BDIM"  ""))
(defun c:TBM()(command "-layer" "T" "-BDIM"  "ON" "-BDIM" ""))	
(defun c:SBM()(command "-layer" "t" "-bdim" "S" "-BDIM"  ""))
(defun c:CHBM(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-BDIM" ""))

;;SP
(defun c:OS()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-SP" "f" "*" "t" "MM,GG,WIR,mark" ""))
(defun c:FS()(command "-layer" "freeze" "-SP,-SPDIM"  ""))
(defun c:TS()(command "-layer" "T" "-SP,MM,GG,WIR,mark"  "ON" "-SP,MM,GG,WIR,mark" ""))	
(defun c:SS()(command "-layer" "t" "-sp,MM,GG,WIR,mark" "S" "-SP"  ""))
(defun c:ES()(command "-layer" "E" "-SP"  ""))
(defun c:COS(/ a)
    (setq a (ssget))
    (command "copy" a "" "0,0" "0,0")
    (command "change" a "" "p" "la" "-SP" ""))
(defun c:CHS(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-SP" ""))

;;SPDIM
(defun c:OSM()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-SPDIM" "f" "*"  ""))
(defun c:FSM()(command "-layer" "OFF" "-SPDIM"  ""))
(defun c:TSM()(command "-layer" "T" "-SPDIM"  "ON" "-SPDIM" ""))	
(defun c:SSM()(command "-layer" "t" "-spdim" "S" "-SPDIM"  ""))
(defun c:CHSM(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-SPDIM" ""))

;;sb
(defun c:OsB()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-sb" "f" "*" "t" "MM,GG,WIR,mark" ""))
(defun c:FsB()(command "-layer" "freeze" "-sb,-sbDIM"  ""))
(defun c:TsB()(command "-layer" "t" "-sb" "ON" "-sb,-sbDIM,MM,GG,WIR,mark" ""))	
(defun c:SsB()(command "-layer" "t" "-sb,MM,GG,WIR,mark" "S" "-sb"  ""))
(defun c:EsB()(command "-layer" "E" "-sb"  ""))
(defun c:COsB(/ a)
    (setq a (ssget))
    (command "copy" a "" "0,0" "0,0")
    (command "change" a "" "p" "la" "-sb" ""))
(defun c:CHsB(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-sb" ""))

;;SP1
(defun c:OS1()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-SP1" "f" "*"  "t" "MM,GG,WIR,mark" ""))
(defun c:FS1()(command "-layer" "freeze" "-SP1,-SP1DIM"  ""))
(defun c:TS1()(command "-layer" "T" "-SP1,MM,GG,WIR,mark"  "ON" "-SP1,MM,GG,WIR,mark" ""))	
(defun c:SS1()(command "-layer" "t" "-sp1,MM,GG,WIR,mark" "S" "-SP1"  ""))
(defun c:ES1()(command "-layer" "E" "-SP1"  ""))
(defun c:COS1(/ a)
    (setq a (ssget))
    (command "copy" a "" "0,0" "0,0")
    (command "change" a "" "p" "la" "-SP1" ""))
(defun c:CHS1(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-SP1" ""))

;;SP1DIM
(defun c:OS1M()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-SP1DIM" "f" "*"  ""))
(defun c:FS1M()(command "-layer" "off" "-SP1DIM"  ""))
(defun c:TS1M()(command "-layer" "T" "-SP1DIM"  "ON" "-SP1DIM" ""))	
(defun c:SS1M()(command "-layer" "t" "-sp1dim" "S" "-SP1DIM"  ""))
(defun c:CHS1M(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-SP1DIM" ""))


;;SP2
(defun c:OS2()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-SP2" "f" "*"  "t" "MM,GG,WIR,mark" ""))
(defun c:FS2()(command "-layer" "freeze" "-SP2,-SP1DIM"  ""))
(defun c:TS2()(command "-layer" "T" "-SP2,MM,GG,WIR,mark"  "ON" "-SP2,MM,GG,WIR,mark" ""))	
(defun c:SS2()(command "-layer" "t" "-sp2,MM,GG,WIR,mark" "S" "-SP2"  ""))
(defun c:ES2()(command "-layer" "E" "-SP2"  ""))
(defun c:COS2(/ a)
    (setq a (ssget))
    (command "copy" a "" "0,0" "0,0")
    (command "change" a "" "p" "la" "-SP2" ""))
(defun c:CHS2(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-SP2" ""))

;;SP2DIM
(defun c:OS2M()(command "-layer" "on" "*" "u" "*" "t" "*" "s" "-SP2DIM" "f" "*"  ""))
(defun c:FS2M()(command "-layer" "OFF" "-SP2DIM"  ""))
(defun c:TS2M()(command "-layer" "T" "-SP2DIM"  "ON" "-SP2DIM" ""))	
(defun c:SS2M()(command "-layer" "t" "-sp2dim" "S" "-SP2DIM"  ""))
(defun c:CHS2M(/ a)
    (setq a (ssget))
    (command "change" a "" "p" "la" "-SP2DIM" ""))


