Your Block Level 3 is only the green parts [rectangle and label]. If I understand your description correctly, aren't the two Blocks Level 2 supposed to be nested in and part of Block Level 3 [just as the Blocks Level 1 are nested in Block Level 2], not just surrounded by it?
I think either way could be done, but whether or not the Level 2 Blocks should be nested in the Level 3 Block makes a big difference to the approach needed to do what you're asking.
EDIT: If the Level 2's are supposed to be nested in the Block Level 3 [I REFEDITed Level 3 to make the Level 2 Blocks part of it], then this worked for me:
(defun C:BXNL ; = Block(s) eXplode but Not Lowest level
(/ ss)
(command "_.explode" (car (entsel "\nSelect top-level Block: ")))
(while
(setq ss (ssget "_P" '((0 . "INSERT")))); any Blocks left from last Explode
(initcommandversion)
(command "_.explode" ss "")
); while
(command "_.u"); Undo last Explode
(prin1)
)
It Exploded Level 2 and Level 3, but left the Level 1 Blocks as Blocks.
Kent Cooper, AIA