- 积分
- 15561
- 明经币
- 个
- 注册时间
- 2004-3-7
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
发表于 2004-3-30 22:23:00
|
显示全部楼层
我看lisp完全可以,所需的仅仅是时间而已.
尺寸也可以完全实现.
下面是我刚刚写成的程序.分享一下先.
(defun c:dde(/ oldpl dimybk yxpbl)
(defun *error* (aeor) (if aeor (princ "\n〖程序退出〗 2004.3.30 yxp")) (setq *error* nil) (princ) ) (setq oldpl (getvar "PLINEWID") oldtxt (getvar "TEXTSTYLE")) (setvar "PLINEWID" 50) (setvar "cmdecho" 0) (if (= (getvar "userr5") 0) (setvar "userr5" 1))
(setq bi_li (getvar "userr5") yxpbl (getreal (strcat "\n 请输入标注尺寸比例<" (rtos bi_li 2) ">:")) yxpbl (if yxpbl (setvar "userr5" yxpbl) bi_li))
;;制作标注的图块 (if (tblsearch "block" "_yxpdim") (princ) (progn (setq dimybk (ssadd)) (command "line" "0,0" "300,0" "") (ssadd (entlast) dimybk)
(command "pline" "80,-70" "220,70" "") (ssadd (entlast) dimybk) (command "block" "_yxpdim" "150,0" dimybk "") ) ) (if (= (tblsearch "style" "dim_yxp") nil) (command "style" "dim_yxp" "simplex.shx" "0" "0.8" "0" "" "" "") ) (princ) (setvar "PLINEWID" oldpl)
(setvar "TEXTSTYLE" oldtxt)
;(setvar "dimsah" 1) ;用户自定义标注打开
(setvar "dimscale" yxpbl) ;标注的总体大小比例 (setvar "dimblk" "_yxpdim") ;尺寸箭头 (setvar "dimasz" 1) ;箭头大小
;(setvar "dimaltu" 2) ;十进制单位
(setvar "dimunit" 2) ;十进制单位 (setvar "dimaunit" 1) ;标注角度为度分秒
;(setvar "dimaltd" 0) ;小数点的位数
(setvar "dimdec" 0) ;小数点的位数
(setvar "dimexe" 200) ;界线伸出长度
(setvar "dimaltf" 1) ;标注比例系数 (setvar "dimjust" 0) ;文字沿标注线方向,在标注线中间
;(setvar "dimtoh" 1) ;文字沿标注线方向 (setvar "dimtxt" 300) ;文字高度 (setvar "dimtad" 0) ;文字对中 (setvar "dimtvp" 0.8) ;文字距尺寸线距离 (setvar "dimtxsty" "dim_yxp") ;文字样式
(command "_dimaligned") (princ) )
|
|