本帖最后由 xyp1964 于 2024-11-19 22:27 编辑
- (defun c:tt ()
- (defun xyp-dxf (code e) (cdr (assoc code (entget e))))
- (setq i -1)
- (if (setq ss (ssget '((0 . "LINE"))))
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (setq p1 (xyp-DXF 10 s1)
- p2 (xyp-DXF 11 s1)
- )
- (if (not(or (equal (car p1) (car p2)) (equal (cadr p1) (cadr p2))))
- (vla-put-color (vlax-ename->vla-object s1) 1)
- )
- )
- )
- (princ)
- )
- (defun c:tt ()
- (setq i -1)
- (if (setq ss (ssget '((0 . "LINE"))))
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (setq s (vlax-curve-getStartPoint s1)
- e (vlax-curve-getEndPoint s1)
- )
- (if (not (or (equal (car s) (car e)1e-3) (equal (cadr s) (cadr e)1e-3)))
- (vla-put-color (vlax-ename->vla-object s1) 1)
- )
- )
- )
- (princ)
- )
|