第一次用lisp,编辑了一个A4图框
(defun c:a4 (/ v1 v2 bl) ;命令a4;;初始化环境
(setq v1 (getvar "osmode"))
(setq v2 (getvar "cmdecho"))
(setvar "osmode" 0)
(setvar "cmdecho" 0)
;;
(command "style" "文字" "宋体" "" "" "" "" "" "") ;定义汉字样式为“文字”(6个默认)
(command "layer" "m" "细实线" "") ;生成当前图层“细实线”
(command "limits" "0,0" "210,297")
(command "zoom" "a")
(command "line" "0,0" "0,297" "210,297" "210,0" "c") ;绘制a4图纸边界线
(command "layer" "m" "粗实线" "lw" 0.4 "" "") ;生成当前图层“粗实线”
(command "line" "10,10" "10,282" "200,282" "200,10" "c") ;绘制图框粗线
(command "layer" "m" "细实线" "") ;在细线层上绘制内部线条
(command "line" "10,15" "195,15" "195,277" "35,277""35,15""")
(command "line" "10,119" "35,119" "")
(command "line" "10,111" "35,111" "")
(command "line" "10,103" "35,103" "")
(command "line" "10,95" "35,95" "")
(command "line" "10,87" "35,87" "")
(command "line" "10,79" "35,79" "")
(command "line" "10,71" "35,71" "")
(command "line" "10,63" "95,63" "")
(command "line" "10,55" "35,55" "")
(command "line" "10,47" "35,47" "")
(command "line" "10,39" "145,39" "")
(command "line" "10,31" "35,31" "")
(command "line" "10,23" "35,23" "")
(command "line" "35,69" "195,69" "")
(command "line" "35,57" "95,57" "")
(command "line" "35,51" "95,51" "")
(command "line" "35,45" "95,45" "")
(command "line" "35,33" "195,33" "")
(command "line" "35,27" "95,27" "")
(command "line" "35,21" "145,21" "")
(command "line" "43,69" "43,39" "")
(command "line" "51,69" "51,39" "")
(command "line" "69,69" "69,39" "")
(command "line" "87,69" "87,39" "")
(command "line" "95,69" "95,15" "")
(command "line" "50,39" "50,15" "")
(command "line" "50,39" "50,15" "")
(command "line" "65,39" "65,15" "")
(command "line" "80,39" "80,15" "")
(command "line" "102.5,33" "102.5,21" "")
(command "line" "110,33" "110,21" "")
(command "line" "117.5,33" "117.5,21" "")
(command "line" "125,39" "125,21" "")
(command "line" "135,39" "135,21" "")
(command "line" "145,69" "145,15" "")
(command "line" "120,21" "120,15" "")
(command "line" "145,51" "195,51" "")
(command "line" "35,260.72" "85,260.72" "85,276.72" "")
(command "layer" "m" "0" "") ;切换至0层
(command "text" "m" (list 22.5 115.2) 2.5 0 "借(通)用件登记");填写标题栏
(command "text" "m" (list 23 105.8) 2.5 0 "描 图")
(command "text" "m" (list 23 89.8) 2.5 0 "描 校")
(command "text" "m" (list 22.2 74) 2.5 0 "旧底图登记")
(command "text" "m" (list 22.7 57.8) 2.5 0 "底 图 总 号")
(command "text" "m" (list 23 41.8) 2.5 0 "签 字")
(command "text" "m" (list 23 26) 2.5 0 "日 期")
(command "text" "m" (list 39.1 41.8) 2.5 0 "标记")
(command "text" "m" (list 47 41.8) 2.5 0 "处数")
(command "text" "m" (list 60.3 41.8) 2.5 0 "更改文件号")
(command "text" "m" (list 78.3 41.8) 2.5 0 "签 字")
(command "text" "m" (list 91 41.8) 2.5 0 "日期")
(command "text" "m" (list 43.2 35.6) 2.5 0 "设计")
(command "text" "m" (list 43.2 30) 2.5 0 "绘图")
(command "text" "m" (list 43.2 23.8) 2.5 0 "审核")
(command "text" "m" (list 43.2 18.4) 2.5 0 "工艺")
(command "text" "m" (list 72.6 35.6) 2.5 0 "标准化")
(command "text" "m" (list 72.6 30) 2.5 0 "审定")
(command "text" "m" (list 72.6 18.4) 2.5 0 "日期")
(command "text" "m" (list 110 35.6) 2.5 0 "阶 段 标 识")
(command "text" "m" (list 129.9 35.6) 2.5 0 "重量")
(command "text" "m" (list 139.8 35.6) 2.5 0 "比例")
(command "text" "m" (list 107 18.4) 2.5 0 "第 页")
(command "text" "m" (list 131.8 18.4) 2.5 0 "共 页")
;;还原环境设置
(setvar "osmode" v1)
(setvar "cmdecho" v2)
(princ)
)
不错,下了学习一下 怎么做的呀?
页:
[1]