再请教一下,我现在是做的的两个文件中数值所计算后的数值作为坐标,来画线。 为什么楼上的加上 (command "c")就可以曲线闭合,而下面的代码就不行呢,帮我看看问题所在,谢谢 (defun c:bianxing() (setq oldcmd (getvar "cmdecho")) (setvar "cmdecho" 0) (setq oldblip (getvar "blipmode")) (setvar "blipmode" 0) (setq oldsnap (getvar "osmode")) (setvar "osmode" 0) (setq rr (getfiled "请选择变形数据文件" "a0" "txt;dat;*" 8)) (setq rr1 (open rr "r")) (setq ff (getfiled "请选择变形数据文件" "a2" "txt;dat;*" 8)) (setq ff1 (open ff "r")) (command "pline" ) (while (setq data (read-line ff1)) ;循环读取每一行 (setq aa (strcat "(" data ")"));用来检测读出的数据格式 (setq bb (read aa)) ;用来检测读出的数据格式 (setq data (read (strcat "(" data ")"))) (setq number (car bb) neirong (cadr bb )) (setq coor (read-line rr1)) (setq coor (read (strcat "(" coor ")"))) (setq xx (car coor) yy (cadr coor)) (setq xx1 (+ xx number) yy1 (+ yy neirong)) (setq coor1 (list xx1 yy1)) (command coor1) ) (command "c") (prin1) )
|