Many thanks for your reply.
I used something similar including code to prevent certain title block objects from being exploded in my Redefine.lsp, which works to a degree, but falls down on Dynamic blocks when they have an Anonymous Name too.
I originally done this for the explode command which lost its 'X' shortcut key.
;;-------------------------------------------------------------------------------
;;EXPLODE
;;-------------------------------------------------------------------------------
(command "UNDEFINE" "EXPLODE")
(defun C:EXPLODE ( / lst1 en typ)
(setq lst1 (list "BLOCK_NAME_1" "BLOCK_NAME_2" "BLOCK_NAME_3"))
(setq en (car (entsel "\nSelect objects to explode")))
(setq typ (entget en))
(setq typ (cdr (assoc 2 typ)))
(if (member typ lst1)
(alert "\nThis block cannot be exploded.")
(progn
(command ^c^c)
(command ".EXPLODE" en)
)
)
(princ)
)
(princ)
;;-------------------------------------------------------------------------------
(defun c:x ()(c:explode))
;;-------------------------------------------------------------------------------