这是别人的程序,可我在运行时总出错,真不知道该怎样解决?
(defun c:ttpts (/ f ff a lst ilst nlst)
(if (and (setq f (getfiled "pts.txt" "" "" 4)) ;(指定路径,文件名)
(setq ilst (getstring T "\n输入点序列(1起算,以空格分开):")) ;; 如"2 4 6 1 9"
)
(progn
(setq ff (open (findfile f) "r"))
(while (setq a (read-line ff))
(setq lst (cons (cdr (read (strcat "(" a ")"))) lst))
)
(close ff)
(setq lst (reverse lst)
nlst(mapcar '(lambda(x)(nth (1+ x)lst)) (read (strcat "(" ilst ")")))
)
(apply 'command (cons "pline" nlst))
(command "")
)
)
)
比如说:当我输入点号1 2 4 6 8时,它就会连接2 4 8 2或者其他的局部连线;有些时候我就是输入再多的点号它干脆就不连线了!!!!
真是急死人了!!!!! |