- ;;我认为不可行,反应器对UNDO不是很好
- ;;即图元删除又UNDO恐怕很容易当机
- ;;下列程序对简单的图可以,但大图会受不了!
- ;;BY 龙龙仔(LUCAS)
- ;;打开图时先记录图元到表
- (defun TT (/ ENT ENT1)
- (vl-load-com)
- (setq LST_ST NIL)
- (vlax-for ENT (vla-get-blocks
- (vla-get-activedocument (vlax-get-acad-object))
- )
- (setq LST_ST (cons (vla-get-handle ENT) LST_ST))
- (vlax-for ENT1 ENT
- (setq LST_ST (cons (vla-get-handle ENT1) LST_ST))
- )
- )
- (princ)
- )
- ;;关图时统计那些图元被删除了
- (defun TTT (/ ENT ENT1 X)
- (vl-load-com)
- (setq LST_END NIL)
- (vlax-for ENT (vla-get-blocks
- (vla-get-activedocument (vlax-get-acad-object))
- )
- (setq LST_END (cons (vla-get-handle ENT) LST_END))
- (vlax-for ENT1 ENT
- (setq LST_END (cons (vla-get-handle ENT1) LST_END))
- )
- )
- (vl-remove 'NIL
- (mapcar '(lambda (X)
- (if (not (vl-position X LST_END))
- ;;(not (member X LST_END))
- X
- )
- )
- LST_ST
- )
- )
- );|
- ;;关图时统计那些图元被删除了
- (defun TTT (/ X)
- (vl-load-com)
- (vl-remove 'NIL
- (mapcar '(lambda (X)
- (if (not (entget (handent X)));;无效???
- X
- )
- )
- LST_ST
- )
- )
- )
- |;
|