批量写图名
本帖最后由 wxa123wl 于 2015-1-15 10:28 编辑求一个批量吧一个矩形的一个图层的问题替换到另一个图层的文字上去,已达到批量写图名的目的 筛选条件用图层就好,, 有点不知道这个帖子要干嘛 图名图层 goto 矩形内? (defun c:TT(/ pts s_x ss str)
(setq str nil)
(setq ss(ssget '((0 . "LWPOLYLINE")(8 . "stru-title"))))
;(command "zoom" "e")
(foreach x(cx-ss2en ss)
(setq pts(get-box x))
(setq s_x(ssget "w" (car pts)(cadr pts)))
(foreach i(cx-ss2en s_x)
(if (and(= "stru-tm"(cx-dxf 8 i))(cx-Etype i "*TEXT"))
(setq str(cx-dxf 1 i))
)
)
(foreach j(cx-ss2en s_x)
(if (and(= "图名"(cx-dxf 8 j))(cx-Etype j "*TEXT"))
(cx-entmod j 1 str)
)
)
)
)
需要 [鱼与熊掌]cx777@139.com(775452144) 的函数支持就可以了,很完美
页:
[1]