查看单个帖子
旧 2009-04-26, 01:57 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 [求助]最小外框

[求助]最小外框
www.dimcax.com
[求助]最小外框
选择n个文本(单行和多行的混合)之后的最小外框,lisp,谢谢
d
(defun c:tl()
(command "ucs" "w")
(setq el (entget (car (entsel))))
(setq ang (* 180.0 (/ (cdr (assoc 50 el)) pi)))
(setq pt (cdr (assoc 10 el)))
(command "ucs" "o" pt "ucs" "z" ang)
(setq tl (textbox el))
(setq point1 (car tl))
(setq point2 (cadr tl))
(command "rectang" " non" point1 "non" point2)
(command "ucs" "w")
)
;;经测试上面的程序对单行文本有效,对多行文本框位置会出错,请各们改一下
d
论坛有很多这样的程序,自己搜搜.
d
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)