您好,我需要一些关于如何检查选择集是否包含“擦除”实体的帮助?
如果是(draworder“back”),则继续执行下一个命令字符串。
如果没有,则只需继续发送一些警报消息。
请看一下我的简单套路
- ;this routine will let the user select multiple object
- ;& PASTEBLOCK the selection - 112011
- ;-
- (defun c:pblk (/ bp opt selx)
- ;-
- (princ "Select basepoint: ")
- (setq bp (getpoint))
- (setq opt "_b")
- ;-
- (setq selx (ssget))
- ;-
- [color="blue"];check the selection set "selx" if there is any "WIPEOUT" entity selected
- ;if "wipeout" is/ are PRESENT (command:"_.draworder" "wipeout" opt)
- ;(alert "wipeout found -> sent to back")
- ;proceed to next
- ;if wipeout is/ are NOT found
- ;(alert "wipeout NOT found")
- ;proceed to next[/color]
- ;-
- (command "_.copybase" bp selx "")
- (command "_.pasteblock" bp)
- (command "_.erase" "previous" "")
- (princ)
- );end defun
- ;;;
(蓝色是我希望可以输入必要代码的地方)
im使用autocad 2009
提前感谢 |