I would suggest the following:
(defun c:blockprops ( / blk def ent enx idx lst sel )
(if (setq sel (ssget '((0 . "INSERT"))))
(progn
(repeat (setq idx (sslength sel))
(setq idx (1- idx)
blk (LM:name->effectivename (cdr (assoc 2 (entget (ssname sel idx)))))
)
(or (member blk lst) (setq lst (cons blk lst)))
)
(while (setq def (tblnext "block" (not def)))
(if (member (LM:name->effectivename (setq blk (cdr (assoc 2 def)))) lst)
(progn
(setq ent (tblobjname "block" blk))
(while (setq ent (entnext ent))
(entmod
(append (entget ent)
(if (= "HATCH" (cdr (assoc 0 enx)))
'((8 . "0") (62 . 000))
'((8 . "0") (62 . 256))
)
)
)
)
)
)
)
(command "_.regen")
)
)
(princ)
)
;; Block Name -> Effective Block Name - Lee Mac
;; blk - [str] Block name
(defun LM:name->effectivename ( blk / rep )
(if
(and (wcmatch blk "`**")
(setq rep
(cdadr
(assoc -3
(entget
(cdr (assoc 330 (entget (tblobjname "block" blk))))
'("AcDbBlockRepBTag")
)
)
)
)
(setq rep (handent (cdr (assoc 1005 rep))))
)
(cdr (assoc 2 (entget rep)))
blk
)
)
(princ)