kpblc & Evgeniy
If I may be so bold, I took your routines & modified for my subroutine like this.
(defun delblock_1 (bnames / ss)
(if (setq ss
(ssget
"_X"
(list
'(0 . "INSERT")
(cons 2
(substr
(apply
(function strcat)
(mapcar (function (lambda (x) (strcat "," x)))
bnames
)
)
2
) ;_ substr
)
) ;_ end of list
) ;_ end of ssget
)
(foreach item
(mapcar
'vlax-ename->vla-object
(vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
) ;_ end of mapcar
(vla-erase item)
) ;_ end of foreach
)
) ;_ end of defun
(delblock_1 '("Aproved Title Block D" "Aproved Title Block"))