大
怎么上传文件的? 生成坐标文件
(defun c:zn()<BR> (setq key 10 i 0 j 0)<BR> (setq obj (car (entsel "\nselect a Polyline: ")))<BR> (setq ent (entget obj))<BR> (setq pt(getpoint"\n坐标册放在:"))<BR> (setq x(car pt))<BR> (setq y(cadr pt))<BR> (setq yn y)<BR> (setq x4(- x 10))<BR> (setq pt4(list x4 y))<BR> (setq x1(+ 18 x4))<BR> (setq pt1(list x1 y))<BR> (setq x2(+ 46 x4))<BR> (setq pt2(list x2 y))<BR> (setq y9(+ y 7))<BR> (setq pt9(list x4 y9))<BR> (command "text" pt9 4 0 "界址点坐标册")<BR> (command "text" pt4 4 0 "点号")<BR> (command "text" pt1 4 0 "X坐标")<BR> (command "text" pt2 4 0 "Y坐标")<BR> <BR> (foreach xy ent<BR> (if (eq (car xy) key )<BR> (progn<BR> (setq j (1+ j))<BR> (setq pe1 (cdr xy))<BR> (command "text" pe1 3 0 j)<BR> (setq yn (- yn 10))<BR> (setq pt3 (list x yn))<BR> (liang pe1 pt3 j )<BR> )<BR> )<BR> )<BR> (setq x5(- x4 3.220))<BR> (setq y5(+ y 5.2259))<BR> (setq pt5(list x5 y5))<BR> (setq x6(+ x5 69.1817))<BR> (setq pt6(list x6 y5))<BR> (command "LINE" pt5 pt6 "")<BR> (setq a(entlast))<BR> (command "array" a "" "r" (+ j 2) 1 -10)<BR> (setq y7(- y5 10))<BR> (setq pt7(list x5 y7))<BR> (command "LINE" pt5 pt7 "")<BR> (setq a(entlast))<BR> (command "array" a "" "r" (+ j 1) 2 -10 11)<BR> (setq pt8(list x6 y7))<BR> (command "LINE" pt6 pt8 "")<BR> (setq a(entlast))<BR> (command "array" a "" "r" (+ j 1) 2 -10 -30)<BR> (princ"广西农垦设计院*梁旭武* QQ75278336")<BR> )<BR> <BR>(defun liang(k pt3 r)<BR> (setq xx(car k))<BR> (setq yy(cadr k))<BR> (setq x1(car pt3))<BR> (setq y1(cadr pt3))<BR> (setq x1(+ 28 x1))<BR> (setq pe1(list x1 y1))<BR> (setq xj( - (car pt3) 10))<BR> (setq pe2(list xj y1))<BR> (command "text" pe2 3 0 r)<BR> (command "text" pt3 3 0 (rtos xx))<BR> (command "text" pe1 3 0 (rtos yy))<BR> )<BR> <BR> 非常不错,太感谢了。 Thanks 与南方CASS中地籍中的功能类似,要是加上每条边的距离和面积汇总就比较完善了,谢谢! 爱你一万年!谢谢你的程序!
页:
[1]