?? mingxilan.lsp
字號:
(defun c:mx ()
(command "_.layer" "n" "粗實線,細實線" "lw"
"0.35" "粗實線" "c" "green" "粗實線"
""
)
(command "_.layer" "s" "粗實線" "")
(setq n (getint "\n\t輸入行數:")
p (getpoint "\n\t指定右下角點:")
px (car p)
py (cadr p)
)
(command "_.line"
(list px py)
(list (- px 180) py)
""
)
(command "_.line"
(list px (+ py 14))
(list (- px 180) (+ py 14))
""
)
(command "_.line"
(list (- px 42) (+ py 7))
(list (- px 20) (+ py 7))
""
)
(setq j 0)
(setq ncol (list 0 -20 -44 -80 -88 -132 -172 -180)
)
(repeat 8
(command "_.line"
(list (+ px (nth j ncol)) py)
(list (+ px (nth j ncol)) (+ py (+ (* 7 n) 14)))
""
)
(setq j (+ 1 j))
)
(command "_.line"
(list (- px 31) (+ py 7))
(list (- px 31) (+ py (+ (* 7 n) 14)))
""
)
(setq i 1)
(command "_.layer" "s" "細實線" "")
(repeat n
(command "_.line"
(list px (+ py (+ (* 7 i) 14)))
(list (- px 180) (+ py (+ (* 7 i) 14)))
""
)
(setq i (+ 1 i))
)
(command "style" "gb" "gbeitc,gbcbig" "" "" "" "" "")
(command "text"
"j"
"mc"
(list (- px 176) (+ py 10.5))
"5"
""
"序"
)
(command "text"
"j"
"mc"
(list (- px 176) (+ py 3.5))
"5"
""
"號"
)
(command "text"
"j"
"mc"
(list (- px 152) (+ py 7))
"5"
""
"代號"
)
(command "text"
"j"
"mc"
(list (- px 110) (+ py 7))
"5"
""
"名稱"
)
(command "text"
"j"
"mc"
(list (- px 84) (+ py 10.5))
"5"
""
"數"
)
(command "text"
"j"
"mc"
(list (- px 84) (+ py 3.5))
"5"
""
"量"
)
(command "text"
"j"
"mc"
(list (- px 61) (+ py 7))
"5"
""
"材料"
)
(command "text"
"j"
"mc"
(list (- px 36.5) (+ py 10.5))
"5"
""
"單件"
)
(command "text"
"j"
"mc"
(list (- px 25.5) (+ py 10.5))
"5"
""
"總計"
)
(command "text"
"j"
"mc"
(list (- px 31) (+ py 3.5))
"5"
""
"重量"
)
(command "text"
"j"
"mc"
(list (- px 10) (+ py 7))
"5"
""
"備注"
)
) ;defun
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -