谢谢、这个可以、我刚刚在晓东上面也看到类似代码了、不过他还加了一个71组码的判断、我没懂是啥意思
- ;;移除剪裁块的剪裁边界
- ;;(gxl-RemoveXclip (car(entsel)))
- (defun gxl-RemoveXclip (en2 / IsXClip el)
- ;;判断图元是否为剪裁块
- (defun IsXClip (en2 / xdict)
- (if (setq xdict (cdr (assoc 360 (entget en2))))
- (IsXClip xdict)
- (if
- (and
- (eq "SPATIAL_FILTER"
- (cdr (assoc 0 (setq en2 (entget en2))))
- )
- (eq 1 (cdr (assoc 71 en2)))
- )
- en2
- )
- )
- )
- (if (setq el (IsXClip en2))
- (progn
- (entmod (subst (cons 71 0) (cons 71 1) el))
- (entupd en2)
- )
- )
- )
- ;;测试命令
- (defun c:tt ()
- (while
- (setq e (car (entsel "\n选择剪裁块:")))
- (gxl-RemoveXclip e)
- )
- (princ)
- )
|