@TerryDotson wrote:
Why destroy perfectly good geometry for this visual effect (afterwards they will list incorrect distances). Instead build a block definition with a circle and a wipeout, then insert that block on top of the polyline vertices!
Using this method, give this a try 🙂
(defun c:foo (/ _chk a b p r s)
;; RJP » 2018-07-26
;; Inserts a mask block on vertices of objects
(defun _chk (p l) (null (vl-some '(lambda (x) (equal p x 1e-8)) l)))
(if (null (tblobjname "block" "_circle"))
(progn (entmake '((0 . "BLOCK")
(100 . "AcDbEntity")
(67 . 0)
(8 . "0")
(100 . "AcDbBlockReference")
(2 . "_circle")
(10 0.0 0.0 0.0)
(70 . 0)
)
)
(entmake '((0 . "LWPOLYLINE")
(100 . "AcDbEntity")
(67 . 0)
(8 . "0")
(62 . 7)
(420 . 16777215)
(100 . "AcDbPolyline")
(90 . 2)
(70 . 129)
(43 . 0.5)
(38 . 0.0)
(39 . 0.0)
(10 -0.25 0.0)
(40 . 0.5)
(41 . 0.5)
(42 . 1.0)
(91 . 0)
(10 0.25 0.0)
(40 . 0.5)
(41 . 0.5)
(42 . 1.0)
(91 . 0)
)
)
(entmake '((0 . "CIRCLE")
(100 . "AcDbEntity")
(67 . 0)
(8 . "0")
(62 . 5)
(100 . "AcDbCircle")
(10 0.0 0.0 0.0)
(40 . 0.5)
)
)
(entmake '((0 . "ENDBLK") (100 . "AcDbBlockEnd") (8 . "0")))
)
)
(cond ((and (setq b (cond ((getdist "\nEnter block size: <1.0>"))
(1.0)
)
)
(setq s (ssget '((0 . "arc,line,lwpolyline"))))
)
(foreach e (vl-remove-if 'listp (mapcar 'cadr (ssnamex s)))
(setq a (vlax-curve-getstartparam e))
(cond ((wcmatch (cdr (assoc 0 (entget e))) "ARC,LINE")
(and (_chk (setq p (vlax-curve-getstartpoint e)) r) (setq r (cons p r)))
(and (_chk (setq p (vlax-curve-getendpoint e)) r) (setq r (cons p r)))
)
((repeat (1+ (fix (vlax-curve-getendparam e)))
(setq p (vlax-curve-getpointatparam e a))
(setq a (1+ a))
(and (_chk p r) (setq r (cons p r)))
)
)
)
)
(foreach p r
(entmakex (list '(0 . "insert")
'(8 . "DonutsYum")
'(2 . "_circle")
(cons 10 p)
(cons 41 b)
(cons 42 b)
(cons 43 b)
)
)
)
)
)
(princ)
)
(vl-load-com)