- 积分
- 1040
- 明经币
- 个
- 注册时间
- 2003-10-28
- 在线时间
- 小时
- 威望
-
- 金钱
- 个
- 贡献
-
- 激情
-
|
该程序想在2004下用MATCHPROP,其选择的方式采用R14的方法,而不是2004的用"格式刷"选完物体,就马上变了,不能后悔.
(defun sele (msg / a)
(prompt msg)
(while (or (= (car (setq a (grread 2 4 2))) 5)))
(if (= (car a) 3)
(setq a (ssget (cadr a)))
)
a
)
(defun err (msg)
(if (or
(= msg "Function cancelled")
(= msg "quit / exit abort")
)
(princ)
(princ (strcat "\nError: " msg))
)
(setq *error* errtmp)
)
(defun c:maa (/ s ss)
(setq errtmp *error*
*error* err
)
(setq s (sele "\nSelect source object:"))
(if (listp s)
(cond
((= s nil) (setq s (sel2 "\nSelect source object:")))
((or (= (car s) 2) (= (car s) 11)) (exit))
)
(setq s (ssname s 0))
)
(setq ss (ssget))
(if (null ss)
(exit)
)
(setvar "cmdecho" 0)
(command "MATCHPROP" s ss "")
(setq *error* errtmp)
(setvar "cmdecho" 1)
(princ)
)
;;当提示选择scource object时,按ESC,就会出现错误“Application ERROR: Console break”,怎么解决呢?
;;无法实现Select destination object(s) or [Settings]里的Settings 功能。
;;无法实现执行命令前选择一物体,然后执行命令后就默认为scource object,只提示用户选择目标物体了。 |
|