求助自动将坐标表格放入图中
记得有一个程序点取多段线,可以将多段线顶点坐标表格放入图中,现在找不到,哪位知道请告诉.谢谢! 搜索关键字""多段线顶点写入到表格"" http://bbs.mjtd.com/forum.php?mod=viewthread&tid=109223&mobile=yes yaokui25 发表于 2014-7-6 18:23 static/image/common/back.gifhttp://bbs.mjtd.com/forum.php?mod=viewthread&tid=109223&mobile=yes
在哪里?找不到.
xyp1964 发表于 2014-7-6 21:42 static/image/common/back.gif
附件不能下载, 本帖最后由 香田里浪人 于 2014-7-9 19:13 编辑
谢谢楼上诸位,电脑里找到了,记不得在哪里下载,程序如下
(defun c:sbzb ()
(setq key 10 i 0 j 0)
(setq obj (car (entsel "\n选择一个多段线: ")))
(setq ent (entget obj))
(setq pt(getpoint"\n坐标表放在:"))
(setq x(car pt))
(setq y(cadr pt))
(setq yn y)
(setq x4(- x 10))
(setq pt4(list x4 y))
(setq x1(+ 18 x4))
(setq pt1(list x1 y))
(setq x2(+ 46 x4))
(setq pt2(list x2 y))
(setq y9(+ y 7))
(setq pt9(list x4 y9))
(command "text" pt9 4 0 "多段线顶点坐标")
(command "text" pt4 4 0 "点号")
(command "text" pt1 4 0 "X坐标")
(command "text" pt2 4 0 "Y坐标")
(foreach xy ent
(if (eq (car xy) key )
(progn
(setq j (1+ j))
(setq pe1 (cdr xy))
(command "text" pe1 3 0 j)
(setq yn (- yn 10))
(setq pt3 (list x yn))
(liang pe1 pt3 j )
)
)
)
(setq x5(- x4 3.220))
(setq y5(+ y 5.2259))
(setq pt5(list x5 y5))
(setq x6(+ x5 69.1817))
(setq pt6(list x6 y5))
(command "LINE" pt5 pt6 "")
(setq a(entlast))
(command "array" a "" "r" (+ j 2) 1 -10)
(setq y7(- y5 10))
(setq pt7(list x5 y7))
(command "LINE" pt5 pt7 "")
(setq a(entlast))
(command "array" a "" "r" (+ j 1) 2 -10 11)
(setq pt8(list x6 y7))
(command "LINE" pt6 pt8 "")
(setq a(entlast))
(command "array" a "" "r" (+ j 1) 2 -10 -30)
)
(defun liang(k pt3 r)
(setq xx(car k))
(setq yy(cadr k))
(setq x1(car pt3))
(setq y1(cadr pt3))
(setq x1(+ 28 x1))
(setq pe1(list x1 y1))
(setq xj( - (car pt3) 10))
(setq pe2(list xj y1))
(command "text" pe2 3 0 r)
(command "text" pe1 3 0 (rtos xx 2 3))
(command "text" pt3 3 0 (rtos yy 2 3))
)
院长思路清晰~!~
求函数xyp-List2TableAuto 楼主不好意思
手机上网,地址贴错了
http://bbs.mjtd.com/thread-109223-1-1.html
看看这个 yaokui25 发表于 2014-7-7 11:12 static/image/common/back.gif
楼主不好意思
手机上网,地址贴错了
http://bbs.mjtd.com/thread-109223-1-1.html
你链接的程序2004运行不了。
页:
[1]
2