autolisp加载成功确提示运行无此命令
(defunctest(p1DXFENAMEISSSSL)(prompt请输入文件名)(setqaa(getstring)aa(strcatdaa.txt)f(opena...
(defun ctest( p1 DXF ENAME I SS SSL)
(prompt 请输入文件名)
(setq aa (getstring ) aa (strcat d aa .txt) f (open aa w))
(princn请选择要取圆心坐标的圆:)
(setq ss(ssget))
(if (= ss nil)
(progn
(setq i 0 ssl (sslength ss))
(setq a 序号 x y)
(write-line a f)
(repeat ssl
(setq ename(ssname ss i))
(setq dxf(entget ename) ii (strlen(rtos i 2 0)) )
(if (= ii 1) (setq p1 (cdr(assoc 10 dxf)) x (car p1) y (cadr p1) a (strcat (itoa i) (rtos x 2 4) (rtos y 2 4)))
(if (= ii 2) (setq p1 (cdr(assoc 10 dxf)) x (car p1) y (cadr p1) a (strcat (itoa i) (rtos x 2 4) (rtos y 2 4)))
(if (= ii 3) (setq p1 (cdr(assoc 10 dxf)) x (car p1) y (cadr p1) a (strcat (itoa i) (rtos x 2 4) (rtos y 2 4)))
(setq p1 (cdr(assoc 10 dxf)) x (car p1) y (cadr p1) a (strcat (itoa i) (rtos x 2 4) (rtos y 2 4)))
)))
(write-line a f)
(prompt a)(terpri)
(setq i(1+ i))
)
)
)
(close f)
) 展开
(prompt 请输入文件名)
(setq aa (getstring ) aa (strcat d aa .txt) f (open aa w))
(princn请选择要取圆心坐标的圆:)
(setq ss(ssget))
(if (= ss nil)
(progn
(setq i 0 ssl (sslength ss))
(setq a 序号 x y)
(write-line a f)
(repeat ssl
(setq ename(ssname ss i))
(setq dxf(entget ename) ii (strlen(rtos i 2 0)) )
(if (= ii 1) (setq p1 (cdr(assoc 10 dxf)) x (car p1) y (cadr p1) a (strcat (itoa i) (rtos x 2 4) (rtos y 2 4)))
(if (= ii 2) (setq p1 (cdr(assoc 10 dxf)) x (car p1) y (cadr p1) a (strcat (itoa i) (rtos x 2 4) (rtos y 2 4)))
(if (= ii 3) (setq p1 (cdr(assoc 10 dxf)) x (car p1) y (cadr p1) a (strcat (itoa i) (rtos x 2 4) (rtos y 2 4)))
(setq p1 (cdr(assoc 10 dxf)) x (car p1) y (cadr p1) a (strcat (itoa i) (rtos x 2 4) (rtos y 2 4)))
)))
(write-line a f)
(prompt a)(terpri)
(setq i(1+ i))
)
)
)
(close f)
) 展开
2个回答
展开全部
以下是改过的代码,能正确调入,但还是有错,没时间帮你了,自己再摸摸吧
(defun c:ctest (p1 DXF ENAME I SS SSL)
(prompt "请输入文件名:")
(setqaa (getstring)
aa (strcat d aa.txt)
f (open aa w)
)
(princ "请选择要取圆心坐标的圆:")
(setq ss (ssget))
(if (= ss nil)
(progn
(setq i0
ssl(sslength ss)
)
(setq a "序号:"
x y
)
(write-line a f)
(repeat ssl
(setq ename (ssname ss i))
(setq dxf (entget ename)
ii (strlen (rtos i 2 0))
)
(if (= ii 1)
(setqp1 (cdr (assoc 10 dxf))
x (car p1)
y (cadr p1)
a (strcat (itoa i) (rtos x 2 4) (rtos y 2 4))
)
(if (= ii 2)
(setq p1 (cdr (assoc 10 dxf))
x (car p1)
y (cadr p1)
a (strcat (itoa i) (rtos x 2 4) (rtos y 2 4))
)
(if(= ii 3)
(setq p1 (cdr (assoc 10 dxf))
x (car p1)
y (cadr p1)
a (strcat (itoa i) (rtos x 2 4) (rtos y 2 4))
)
(setq p1 (cdr (assoc 10 dxf))
x (car p1)
y (cadr p1)
a (strcat (itoa i) (rtos x 2 4) (rtos y 2 4))
)
)
)
)
(write-line a f)
(prompt a)
(terpri)
(setq i (1+ i))
)
)
)
(close f)
)
(defun c:ctest (p1 DXF ENAME I SS SSL)
(prompt "请输入文件名:")
(setqaa (getstring)
aa (strcat d aa.txt)
f (open aa w)
)
(princ "请选择要取圆心坐标的圆:")
(setq ss (ssget))
(if (= ss nil)
(progn
(setq i0
ssl(sslength ss)
)
(setq a "序号:"
x y
)
(write-line a f)
(repeat ssl
(setq ename (ssname ss i))
(setq dxf (entget ename)
ii (strlen (rtos i 2 0))
)
(if (= ii 1)
(setqp1 (cdr (assoc 10 dxf))
x (car p1)
y (cadr p1)
a (strcat (itoa i) (rtos x 2 4) (rtos y 2 4))
)
(if (= ii 2)
(setq p1 (cdr (assoc 10 dxf))
x (car p1)
y (cadr p1)
a (strcat (itoa i) (rtos x 2 4) (rtos y 2 4))
)
(if(= ii 3)
(setq p1 (cdr (assoc 10 dxf))
x (car p1)
y (cadr p1)
a (strcat (itoa i) (rtos x 2 4) (rtos y 2 4))
)
(setq p1 (cdr (assoc 10 dxf))
x (car p1)
y (cadr p1)
a (strcat (itoa i) (rtos x 2 4) (rtos y 2 4))
)
)
)
)
(write-line a f)
(prompt a)
(terpri)
(setq i (1+ i))
)
)
)
(close f)
)
浙江启扬智能科技有限公司
2023-06-12 广告
2023-06-12 广告
Linux 嵌入式系统中,USB 启动模式能够烧写 ARM 的 uboot 的原因主要有以下几个方面:1. USB 启动模式相对于传统的 BIOS 启动模式来说,具有更高的兼容性和灵活性,可以支持更多的硬件设备和操作系统。2. USB 启动...
点击进入详情页
本回答由浙江启扬智能科技有限公司提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询