If you have blocks that lie upon a line and where they are on the line it has been trimmed, this routine might be of some use. this routine will let you simply select the block that rests on your line and will delete the block and join the lines into one line.
- HEAL2 <enter>
- Select the block that needs to be erased
(defun c:HEAL2 (/ block ll ur objecttojoin) (vl-load-com) (setq block (car (entsel "\nSelect Block:"))) (vla-getboundingbox (vlax-ename->vla-object block) 'll 'ur) (command "_.erase" block "") (setq objecttojoin (ssget "C" (vlax-safearray->list ll) (vlax-safearray->list ur))) (command "_.join" (ssname objecttojoin 0) (ssname objecttojoin 1) "") )