- UID
- 430592
- 积分
- 233
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2006-4-29
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
索引标注软件
(defun C:sy1( / lay scab scale pt1 pt2 pt3 pt4 pt5 pt6 high dx dy dx1 dy1
txt1 txt2 txt3 be)
(setvar "CMDECHO" 0)
(setq lay (getvar "clayer"))
(command "color" "bylayer")
(command "layer" "m" "sy" "c" "g" "sy" "")
(if (or (= nil (tblsearch "style" "xw"))
(/= (cdr (assoc 40 (tblsearch "style" "xw"))) 0)
)
(command "STYLE" "xw" "txt" "0" ".8" "0" "n" "n" "n")
)
(if (= scab nil) (setq scab 100))
(setq scale (getreal (strcat "\nScale <" (rtos scab 2 0) ">:")))
(if (= scale nil) (setq scale scab))
(setq scab scale)
(setq pt1 (getpoint "\n第一点: "))
(setq pt2 (getpoint pt1 "\n第二点: "))
(setq dy (car pt1))
(setq dy1 (car pt2))
(setq be T)
(if (> dy1 dy) (setq be nil))
(setq txt1 (strcase (getstring "\n图集名称:") nil))
(setq txt2 (getstring "\n详图编号:"))
(setq txt3 (getstring "\n图集页次:"))
(setq high (* scale 4))
(setq dy (cadr pt2))
(setq dx (car pt2))
(if (= be nil)
(setq dx1 (+ dx (* scale 5)))
(setq dx1 (- dx (* scale 5)))
)
(setq dy1 (+ dy (* scale 1.15)))
(setq pt3 (list dx1 dy1))
(if (= be nil)
(command "text" pt3 high "0" txt1)
(command "text" "j" "r" pt3 high "0" txt1)
)
(if (= be nil)
(progn
(setq pt4 (polar pt2 0 (* scale (+ 5 (* 4 0.8 (strlen txt1)) 1.5 5))))
(command "pline" pt1 "w" "0" "0" pt2 (polar pt4 0 (* 5 scale)) "")
(command "circle" pt4 (* 5 scale))
)
(progn
(setq pt4 (polar pt2 pi (* scale (+ 5 (* 4 0.8 (strlen txt1)) 1.5 5))))
(command "pline" pt1 "w" "0" "0" pt2 (polar pt4 pi (* 5 scale)) "")
(command "circle" pt4 (* 5 scale))
)
)
(setq dy (cadr pt4))
(setq dx (car pt4))
(setq dx1 (- dx (* scale 1.2)))
(setq dy1 (+ dy (* scale 0.9)))
(setq pt5 (list dx1 dy1))
(setq pt6 (polar pt5 0 (* scale 2.4)))
(command "text" "j" "f" pt5 pt6 (* scale 3.3) txt2)
(setq dx1 (- dx (* scale 1.2)))
(setq dy1 (- dy (* scale 4.2)))
(setq pt5 (list dx1 dy1))
(setq pt6 (polar pt5 0 (* scale 2.4)))
(command "text" "j" "f" pt5 pt6 (* scale 3.3) txt3)
(command "layer" "s" lay "")
(princ)
)
这是从网上下载的索引标注软件,想请高手改动一下,不需要输图集名称,而是把图集名称固定下来,比如图集名称固定为TB2005 |
|