帮我找找毛病,头都大了
,这个程序主要是要把一个闭合的pline线关键点的坐标都标出来,可怎么也执行不了,高手帮忙看看 <P>(defun c:tt ()<BR> (vl-load-com)<BR> (setq obj (car (entsel "\nSelect a Polyline: ")))<BR> (MASSOC 10 (entget obj))<BR>)<BR>(defun massoc (key alist / nlist tmp)</P><P> (foreach x alist<BR> (if (eq key (car x))<BR> (setq nlist (cons (cdr x) nlist))<BR> )<BR> )</P>
<P> (setq num (length nlist))<BR> (setq tmp 0)<BR> (repeat num<BR> (zz (nth tmp nlist))<BR> (setq tmp (+ 1 tmp))<BR> )<BR>)</P>
<P>(defun zz (p1 / x y)<BR> (setq<BR> x (strcat "X-" (rtos (nth 0 p1) 2 3))<BR> y (strcat "Y-" (rtos (nth 1 p1) 2 3))<BR> )<BR> (command "line" p1 (polar p1 0 30) "")<BR> (command "text" "j" "bl" p1 2.5 0 x)<BR> (command "text" "j" "tl" (polar p1 85 -2) 2.5 0 y)<BR>)</P>
页:
[1]