I think your before and after are the same, I take it the squares are full length horizontal and vertical lines drawn with 0.1 gap.
So try this, written for some one else so meets their criteria, just edit to suit.
; Break all beams
; Breakall by CAB much appreciated
(defun c:Breakbeams ( / ss ent obj )
(if (not breakall)(load "Breakall"))
;(Break_all ss ss nil)
(c:breakall)
(princ "\n")
(prompt "Select short lengths ")
(setq ss (ssget (list (cons 0 "*LINE,ARC"))))
(repeat (setq x (sslength ss))
(setq obj (vlax-ename->vla-object (ssname ss (setq x (- x 1)))))
(if (= (vlax-get obj 'Objectname) "AcDbArc")
(setq length (vlax-get obj 'ARCLENGTH))
(setq length (vlax-get obj 'LENGTH))
)
(if (< length 0.15)
(vla-delete obj)
)
)
(command "regen")
(princ)
)
Thanks to CAB for break all.