- (defun c:tt ()
- (defun p1p9 (s1 / p1 p9)
- (vla-getboundingbox (vlax-ename->vla-object s1) 'p1 'p9)
- (list (vlax-safearray->list p1) (vlax-safearray->list p9))
- )
- (princ "\n检测单个图元是否超宽…… ")
- (princ "\n框选图元: ")
- (setq i -1)
- (if (setq ss (ssget '((0 . "*POLY*"))))
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (setq ob (vlax-ename->vla-object s1))
- (setq a (p1p9 s1))
- (if (> (abs (- (cadar a) (cadadr a))) 1000)
- (progn (vla-put-layer ob "0") (vla-put-color ob 4))
- (progn (vla-put-layer ob "CUTME") (vla-put-color ob 256))
- )
- )
- )
- (princ)
- )
|