只需一步,快速开始
请问一下,这段代码错在哪里?
(defun c:yy(/ a1 a2 n index b1 b2 d1 d2 b3)(graphscr)(prompt "\nSelsct entities to be changed:")(setq a1 (ssget))(prompt "\nPoint to entity on target layer:")(setq a2 (entsel))(setq n (sslength a1))(setq index 0)(setq b2 (entget (car a2)))(setq d2 (assoc 8 b2)))(repeat n (setq b1 (entget (ssname a1 index)))(setq b1 (assoc 8 b1))(setq d3 (subst d2 d1 b1))(entmod b3)(setq index (+index 1))))
使用道具 举报
userzhl发表于2006-1-18 16:48:00楼主,这段代码是什么功能的?
恩,不好意思,请问哪里一段出错了?
1 (setq d2 (assoc 8 b2))) 這行多了一個 ")"符號 改成 (setq d2 (assoc 8 b2)) 這樣就好了,
2. 程序倒數第三句 (setq index (+index 1)) 這樣寫少了一個空格, 所以出錯, 改成(setq index (+ index 1)) 這樣就好了
本版积分规则 发表回复 回帖后跳转到最后一页
小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 ) ©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途
GMT+8, 2025-6-22 05:17 , Processed in 0.178785 second(s), 25 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.