Hello,
Please this program ago and let me know how it works for you.
Code:
(defun c:Test (/ blk bkn get Obj dxf)
;; Tharwat 03. 11. 2020
(while (setq blk (tblnext "BLOCK" (not blk)))
(or (wcmatch (setq bkn (cdr (assoc 2 blk))) "*|*,_*")
(and (zerop (cdr (assoc 70 blk)))
(setq obj (tblobjname "BLOCK" bkn))
(while
(setq obj (entnext obj))
(and (wcmatch (cdr (assoc 0 (setq get (entget obj))))
"*POLYLINE"
)
(or
(= (setq dxf (cdr (assoc 70 get))) 8)
(= dxf 64)
)
(vla-delete (vlax-ename->vla-object obj))
)
)
)
)
)
(vla-regen
(vla-get-ActiveDocument
(vlax-get-acad-object)
)
acAllViewports
)
(princ)
)
(vl-load-com)