Right then, a couple of things.
1. My mistake for not thoroughly testing the lisp. It looked as though i was getting the result I and @jagostinho74 wanted to achieve, but long story short it didn't. My bad, hands up, but here's another AI generated lisp that does work - as far as i can see.
(defun c:MakeBlocksExplodable ()
(vl-load-com)
(setq *acad* (vlax-get-acad-object))
(setq *doc* (vla-get-ActiveDocument *acad*))
(setq *blocks* (vla-get-Blocks *doc*))
(vlax-for block *blocks*
(if (eq (vla-get-IsXRef block) :vlax-false)
(vla-put-Explodable block :vlax-true)
)
)
(princ "\nAll blocks are now explodable.")
(princ)
)
2. This is a genuine question without looking for an argument. What's the problem with someone using AI to try and find a solution? "If you use chatgpt, co-pilot or others, then do it, but spare others. If you have any questions, ask chatgpt, co-pilot .."