这
- (defun c:test (/ _c d s n e l)
- ;; Tharwat 11.May.2014 ;;
- (defun _c (e)
- (foreach p (list (vlax-curve-getStartPoint e) (vlax-curve-getEndPoint e))
- (setq d (ssadd (entmakex (list '(0 . "CIRCLE") (cons 10 p) (cons 40 4.) '(62 . 1))) d))
- )
- )
- (if (setq d (ssadd)
- s (ssget "_:S" '((0 . "*LINE,ARC,ELLIPSE")))
- )
- (repeat (setq n (sslength s))
- (setq e (ssname s (setq n (1- n))))
- (if (eq (cdr (assoc 0 (entget e))) "ELLIPSE")
- (if (not (vlax-curve-isclosed (vlax-ename->vla-object e)))
- (_c e)
- )
- )
- (if (wcmatch (cdr (assoc 0 (entget e))) "*POLYLINE")
- (if (not (vlax-curve-isclosed e))
- (_c e)
- )
- (_c e)
- )
- )
- )
- (sssetfirst nil d)
- (princ)
- )
|