回复 ljpnb 的帖子
试了下程序出现: 语法错误.
已修改过了,你再试试 满头大汗了大半天,终于测试成功
;;;複製圖框內容(AB)
(defun c:ab ()
(setvar "osmode" 0)
(setq nn (car (entsel "\n請選檡原圖框")))
(setq nn1 (entnext nn))
(setq ww (entget nn1))
(setq b1 (cdr (assoc 0 ww)))
(setq c (cdr (assoc 2 ww)))
(setq d (cdr (assoc 1 ww)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(princ "\n可选多个目標圖框: ")
(setq ss (ssget))
(setq i 0)
(repeat (sslength ss)
(setq mm1(ssname ss i))
(setq mm (entnext mm1))
(setq ww1 (entget mm))
(setq a1 (cdr (assoc 0 ww1)))
(while (= a1 "ATTRIB")
(setq c1 (cdr (assoc 2 ww1)))
(setq e (assoc 1 ww1))
(setq d1 (cons 1 d))
(setq ww2 (subst d1 e ww1))
(entmod ww2)
(entupd mm)
(setq mm (entnext mm))
(setq ww1 (entget mm))
(setq a1 (cdr (assoc 0 ww1)))
(setq nn1 (entnext nn1))
(setq ww (entget nn1))
(setq b1 (cdr (assoc 0 ww)))
(setq d (cdr (assoc 1 ww)))
)
(setq nn1 (entnext nn))
(setq ww (entget nn1))
(setq b1 (cdr (assoc 0 ww)))
(setq c (cdr (assoc 2 ww)))
(setq d (cdr (assoc 1 ww)))
(setq i (1+ i))
)
(setvar "osmode" 37)
(setq sapi (vlax-create-object "Sapi.SpVoice"))
(vlax-invoke sapi "Speak" "ok!" 0)
(vlax-release-object sapi)
(princ)
) ;end defun 谢谢楼上各位
收藏下来看看,学习学习。
虽然现在用不上,还是谢谢了。
页:
1
[2]