📄 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 + -