;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
        (defun c:HG1()
          (command "COLOR" "1" "LINETYPE" "S" "CONTINUOUS" "") (PRINC)
)
        (defun c:HG11()
          (command "COLOR" "1" "LINETYPE" "S" "HIDDEN" "") (PRINC)
)
        (defun c:HG111()
          (command "COLOR" "1" "LINETYPE" "S" "CENTER" "") (PRINC)
)
        (defun c:HG1111()
          (command "COLOR" "1" "LINETYPE" "S" "DIVIDE" "") (PRINC)
)
        (defun c:HG2()
          (command "COLOR" "2" "LINETYPE" "S" "BYLAYER" "") (PRINC)
)
        (defun c:HG22()
          (command "COLOR" "2" "LINETYPE" "S" "HIDDEN" "") (PRINC)
)       
        (defun c:HG222()
          (command "COLOR" "2" "LINETYPE" "S" "CENTER" "") (PRINC)
)
        (defun c:HG3()
          (command "COLOR" "3" "LINETYPE" "S" "CONTINUOUS" "") (PRINC)
)        
        (defun c:HG33()
          (command "COLOR" "3" "LINETYPE" "S" "HIDDEN" "") (PRINC)
)
        (defun c:HG333()
          (command "COLOR" "3" "LINETYPE" "S" "CENTER" "") (PRINC)
)
        (defun c:HG4()
          (command "COLOR" "4" "LINETYPE" "S" "CONTINUOUS" "") (PRINC)
)        
        (defun c:HG44()
          (command "COLOR" "4" "LINETYPE" "S" "HIDDEN" "") (PRINC)
)
        (defun c:HG444()
          (command "COLOR" "4" "LINETYPE" "S" "CENTER" "") (PRINC)
)
        (defun c:HG5()
          (command "COLOR" "5" "LINETYPE" "S" "CONTINUOUS" "") (PRINC)
)
        (defun c:HG55()
          (command "COLOR" "5" "LINETYPE" "S" "HIDDEN" "") (PRINC)
)
        (defun c:HG555()
          (command "COLOR" "5" "LINETYPE" "S" "CENTER" "") (PRINC)
)
        (defun c:HG6()
          (command "COLOR" "6" "LINETYPE" "S" "CONTINUOUS" "") (PRINC)
)
        (defun c:HG66()
          (command "COLOR" "6" "LINETYPE" "S" "HIDDEN" "") (PRINC)
)
        (defun c:HG666()
          (command "COLOR" "6" "LINETYPE" "S" "CENTER" "") (PRINC)
)
        (defun c:HG7()
          (command "COLOR" "145" "LINETYPE" "S" "CONTINUOUS" "") (PRINC)
)
        (defun c:HG9()
          (command "COLOR" "25" "LINETYPE" "S" "CONTINUOUS" "") (PRINC)
)
        (defun c:HG10()
          (command "COLOR" "239" "LINETYPE" "S" "CONTINUOUS" "") (PRINC)
)
        (defun c:HG6()
          (command "COLOR" "6" "LINETYPE" "S" "CONTINUOUS" "") (PRINC)
)
        (defun c:HG66()
          (command "COLOR" "6" "LINETYPE" "S" "HIDDEN" "") (PRINC)
)
        (defun c:HG666()
          (command "COLOR" "6" "LINETYPE" "S" "CENTER" "") (PRINC)
)
        (defun c:HG()
          (command "COLOR" "BYLAYER" "LINETYPE" "S" "CONTINUOUS" "") (PRINC)
)
        (defun c:HG8()
          (command "COLOR" "191" "LINETYPE" "S" "CONTINUOUS" "") (PRINC)
)
==========================================================================
        (defun c:s5()
              (command "snapang" "5" "") (PRINC)
)       
        (defun c:s10()
              (command "snapang" "10" "") (PRINC)
)
        (defun c:s15()
              (command "snapang" "15" "") (PRINC)
)
        (defun c:s20()
              (command "snapang" "20" "") (PRINC)
)
        (defun c:s25()
              (command "snapang" "25" "") (PRINC)
)
        (defun c:s30()
              (command "snapang" "30" "") (PRINC)
)
        (defun c:s35()
              (command "snapang" "35" "") (PRINC)
)
        (defun c:s40()
              (command "snapang" "40" "") (PRINC)
)
        (defun c:s45()
              (command "snapang" "45" "") (PRINC)
)
        (defun c:s50()
              (command "snapang" "50" "") (PRINC)
)
        (defun c:s55()
              (command "snapang" "55" "") (PRINC)
)
        (defun c:s60()
              (command "snapang" "60" "") (PRINC)
)
        (defun c:s65()
              (command "snapang" "65" "") (PRINC)
)
        (defun c:s70()
              (command "snapang" "70" "") (PRINC)
)
        (defun c:s75()
              (command "snapang" "75" "") (PRINC)
)
        (defun c:s80()
              (command "snapang" "80" "") (PRINC)
)
        (defun c:s85()
              (command "snapang" "85" "") (PRINC)
)
        (defun c:s0()
              (command "snapang" "0" "") (PRINC)
)
        (defun c:s90()
              (command "snapang" "90" "") (PRINC)
)

========================================================================== 
        (defun c:OO()
          (command "OSMODE" "2060" "UCS" "o") (PRINC)
)
(defun c:ER ()   ;EXPLODE AND CHANGE TO CURRENT LATER
     (command "EXPLODE" pause)
     (command "CHANGE" "P" "" "P" "LA" (getvar "CLAYER") "") (PRINC)
)                ;EXPLODE AND CHANGE TO CURRENT LATER 
========================================================================
 
(defun c:`   () (command "dist" ))
(defun c:Q   () (command "MATCHPROP" ))
(defun c:j   () (command "copy" ))
(defun c:w0  () (command "dim"  "dec"  "0"  "exit" ))
(defun c:w1  () (command "dim"  "dec"  "1"  "exit" ))
(defun c:w2  () (command "dim"  "dec"  "2"  "exit" ))
(defun c:w3  () (command "dim"  "dec"  "3"  "exit" ))
(defun c:22   () (command  (C:ddmodify)    ))
=====================================================================================
(defun c:dc  () (command "dim" "" "cen"  ))
(defun c:dr  () (command "dim" "" "dia"))
(defun c:rr  () (command "dim" "" "rad"))
=====================================================================================
(defun c:AA  () (command "LAYER" "OFF" "*" "Y" "ON" "Z" "LO" "Z" "" ))
(defun c:as  () (command "LAYER" "OFF" "*" "Y" "ON" "*" "" )) 
===================================================================================== 

(defun c:ll  () (command (c:extrim)))
(defun c:7  () (command "ddosnap"))
(defun c:8  () (command (c:find )))
(defun c:9  () (command (c:revcloud )))
(defun c:VV  () (command (c:laythw )))
====================================================================================
(defun c:GG  () (command (c:laylck )))
(defun c:mm  () (command (c:layulk )))
(defun c:ad  () (command (c:layoff )))
(defun c:kk  () (command (c:layfrz )))
(defun c:af  () (command (c:layiso )))
(defun c:lc  () (command (c:laycur )))
(defun c:qw  () (command (c:ai_molc )))
====================================================================================
(defun c:ZE()
  (command "ZOOM" "E") (PRINC)
)
(defun c:ZD()
  (command "ZOOM" "D") (PRINC)
)
(defun c:N()
  (command "ZOOM" "P") (PRINC)
)
(defun c:ZS()   
  (command "ZOOM" ".5X") (PRINC)
)
(defun c:ZX()   
  (command "ZOOM" "2X") (PRINC)
) 
(defun c:ZB()
  (command "ZOOM" ".2X") (PRINC)
)
(defun c:TA()
  (command "LAYER" "T" "*" "") (PRINC)
)
(defun c:TD()
  (command "LAYER" "T" "D" "") (PRINC)
)
(defun c:FA()
  (command "LAYER" "F" "*" "") (PRINC)
)
(defun c:LN()
       (command "LENGTHEN" "DY") (PRINC)
)
(defun c:SsD()
    (command "LAYER" "T" "Dim" "S" "Dim" "")) (PRINC)
(defun c:SsW()
    (command "LAYER" "T" "Note" "S" "Note" "")) (PRINC)
(defun c:BD()
    (command "LAYER" "T" "BORD" "S" "BORD" "")) (PRINC)
============================================================================

(defun c:fd()
    (command "LAYER" "S" (strcat (SUBSTR (GETVAR "CLAYER") 1 4) "dim") "") (PRINC)
)
(defun cfn()
    (command "LAYER" "S" (strcat (SUBSTR (GETVAR "CLAYER") 1 4) "note") "") (PRINC)
)
(defun c:PU()
    (command "PURGE" "A" "" "N") (PRINC)
)
(defun c:11()
    (command "cursorsize" "100") (PRINC)
)
(defun c:12()
    (command "cursorsize" "5") (PRINC)
)
(defun c:OO()
    (command "OSMODE" "2060" "UCS" "o") (PRINC)
)    
(defun c:MN()
    (command "MENULOAD" "AC_BONUS.MNS") (PRINC)
)
(defun c:CCp()
    (setq A  (ssget)
          p0 (getpoint "\nBase point:")
    )
    (command "COPY"A "" "M"p0) (PRINC)
)
(defun c:CcL()
    (setq a (ssget))
    (setq layr (getstring "\nEnter the LAYERNAME copy to:"))
    (command "COPY" a "" "0,0""0,0")
    (command "CHANGE" a "" "P" "LA" layr "") (PRINC)
)
(defun c:ccm (/ ss layr)
  (setq ss (ssget))
  (if ss
    (progn
      (setq layr (getstring "\nEnter the LAYERNAME copy to:"))
      (command "CHANGE" ss "" "P" "LA" layr "")
    )
  )
  (princ)
)
(defun c:O11()
    (command "osnap" "mid,end,cen,int,per")
)
(defun C:O12()
    (command "osnap" "cen,nod,app")
)
(defun C:O13()
    (command "osnap" "end,per,qua")
)
(defun C:bc()
    (ssget)
    (command "color" "bylayer")
)
===========================================================================	
(defun c:ER ()   ;EXPLODE AND CHANGE TO CURRENT LATER
     (command "EXPLODE" pause)
     (command "CHANGE" "P" "" "P" "LA" (getvar "CLAYER") "") (PRINC)
)                ;EXPLODE AND CHANGE TO CURRENT LATER
===========================================================================
(defun c:EW ()   ;誑遙弇离
   (command "OSMODE" "68")
   (setq SL1 (SSGET)
         SL2 (SSGET)
         pb1 (getpoint "\nFirst base point:")
         pb2 (getpoint "\nSecond base point:")
   )
     (command "MOVE" SL1 "" pb1 pb2 "MOVE" SL2 "" pb2 pb1) (PRINC)
)                ;誑遙弇离
==========================================================================
(defun DIMM ()
   (setvar "CMDECHO" 0)
   (setq S (ENTSEL "\n PLEASE PICK A3 OR A4:")
         EN (ENTGET (CAR S))
   )
      (IF (OR (= (cdr (assoc 2 EN)) "3A") (= (cdr (assoc 2 EN)) "4A")
              (= (cdr (assoc 2 EN)) "A3") (= (cdr (assoc 2 EN)) "A4")
          )
            (setq EN1 (cdr (assoc 41 EN)))
      )
)
(defun c:DIMS()
   (DIMM)
   (setvar "DIMSCALE" EN1)
)
==========================================================================
(defun c:KT (/ SS TXSIZE N INDEX ENT TYPE OLDSIZE NEWSIZE ENT1)
  (setq SS (SSGET)
        TXSIZE (GETDIST "\n ENTER NEW TEXT SIZE:")
        N (SSLENGTH SS)
        INDEX 0
  )
  (REPEAT N
     (setq ENT (ENTGET (SSNAME SS INDEX))
           INDEX (+ 1 INDEX)
           TYPE (ASSOC 0 ENT)
     )
        (IF (= "TEXT" (CDR TYPE))
            (PROGN
               (setq OLDSIZE (ASSOC 40 ENT)
                     NEWSIZE (CONS (CAR OLDSIZE) TXSIZE)
                     ENT1 (SUBST NEWSIZE OLDSIZE ENT)
               )
               (ENTMOD ENT1)
            )
        )
   )
   (PRINC)
)
=============================================================
        (defun c:BK()    ;剿萸
                 (setq  p1(GETPOINT "Brack point:")
                        p2 p1)  
                 (command "BREAK" pause "F" p1 p2) (PRINC)
         )               ;剿萸
=============================================================
(defun c:FF()
          (command "FILLET" "R" "0" "FILLET") (PRINC)
)
=============================================================
(defun c:RR()      ;唅蛌昜极90度
   (setq a (ssget)
         pb (getpoint "\nBase point:"))
   (command "ROTATE" a "" pb "90") (PRINC)
)                  ;唅蛌昜极90度

=============================================================
(defun c:pj()
    (setq pds (setvar "pdsize" 3))
    (prompt"窣諉嗣砱盄")
    ;(setq ss (ssget "c" (setq pt1 (getpoint "\n③恁寁盄僇")) (setq ;pt2 (getcorner pt1 "\n請輸入選擇窗口的對角點"))))
    (setq ss (ssget))
;;;;;;;;;;;;;;;;;;窣諉嗣砱盄最宒
 
    (if (/= ss nil)
      (progn
        (setq nn (sslength ss))
        (setq i 0)
        (repeat nn
          (setq sname (ssname ss i))
          (setq en1 (entget sname))
          (setq en2 (cdr (assoc 0 (entget sname))))
          (if (and (/= en1 nil) (or (= en2 "LINE") (= en2 "ARC") (and (= en2 "LWPOLYLINE") (= (cdr (assoc 70 (entget sname))) 0))))
           (progn
            (setq en(cdr (assoc 0 (entget sname))))
            (if (or (= en "LWPOLYLINE") (= en "POLYLINE"))
               (command "pedit" sname "j" ss "" "")
               (command "pedit" sname "y" "j" ss "" "")
              );if
           (setq i (+ i 1))
         );progn
         
      (setq i (+ i 1))
         );if
        
         );repeat
     );progn 
   );if
);;;;;;;;;;;;;;;;end
(princ)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defun C:F0 () (command "fillet" "r" "0.0") (command "fillet"))
(defun C:F01() (command "fillet" "r" "0.1") (command "fillet"))
(defun C:F02() (command "fillet" "r" "0.2") (command "fillet"))
(defun C:F03() (command "fillet" "r" "0.3") (command "fillet"))
(defun C:F04() (command "fillet" "r" "0.4") (command "fillet"))
(defun C:F05() (command "fillet" "r" "0.5") (command "fillet"))
(defun C:F06() (command "fillet" "r" "0.6") (command "fillet"))
(defun C:F08() (command "fillet" "r" "0.8") (command "fillet"))
(defun C:F1 () (command "fillet" "r" "1.0") (command "fillet"))
(defun C:F15() (command "fillet" "r" "1.5") (command "fillet"))
(defun C:F2 () (command "fillet" "r" "2.0") (command "fillet"))
(defun C:F25() (command "fillet" "r" "2.5") (command "fillet"))
(defun C:F3 () (command "fillet" "r" "3.0") (command "fillet"))
(defun C:F35() (command "fillet" "r" "3.5") (command "fillet"))
(defun C:F4 () (command "fillet" "r" "4.0") (command "fillet"))
(defun C:F45() (command "fillet" "r" "4.5") (command "fillet"))
(defun C:F5 () (command "fillet" "r" "5.0") (command "fillet"))
(defun C:F55() (command "fillet" "r" "5.5") (command "fillet"))
(defun C:F6 () (command "fillet" "r" "6.0") (command "fillet"))
(defun C:F65() (command "fillet" "r" "6.5") (command "fillet"))
(defun C:F7 () (command "fillet" "r" "7.0")  (command "fillet"))
(defun C:F75() (command "fillet" "r" "7.5") (command "fillet"))
(defun C:F8 () (command "fillet" "r" "8.0") (command "fillet"))
(defun C:F85() (command "fillet" "r" "8.5") (command "fillet"))
(defun C:F9 () (command "fillet" "r" "9.0") (command "fillet"))
(defun C:F95() (command "fillet" "r" "9.5") (command "fillet"))
(defun C:F10() (command "fillet" "r" "10.") (command "fillet"))
(defun C:C0 () (command "chamfer" "d" "0" "0")  (command "chamfer"))
(defun C:C05 () (command "chamfer" "d" "0.5" "0.5")  (command "chamfer"))
(defun C:C1 () (command "chamfer" "d" "1" "1")  (command "chamfer"))
(defun C:C12 () (command "chamfer" "d" "1.2" "1.2")  (command "chamfer"))
(defun C:C15 () (command "chamfer" "d" "1.5" "1.5")  (command "chamfer"))
(defun C:C2 () (command "chamfer" "d" "2" "2")  (command "chamfer"))
(defun C:C3 () (command "chamfer" "d" "3" "3")  (command "chamfer"))
(defun C:C4 () (command "chamfer" "d" "4" "4")  (command "chamfer"))
(defun C:C5 () (command "chamfer" "d" "5" "5")  (command "chamfer"))
(defun C:C6 () (command "chamfer" "d" "6" "6")  (command "chamfer"))
(defun C:C7 () (command "chamfer" "d" "7" "7")  (command "chamfer"))
(defun C:C8 () (command "chamfer" "d" "8" "8")  (command "chamfer"))
(defun C:C9 () (command "chamfer" "d" "9" "9")  (command "chamfer"))
(defun C:C10() (command "chamfer" "d" "10" "10")(command "chamfer"))

;                           --------------------END---------------------
