Here's another thought to exclude a picked item type:
(defun c:foo (/ a e f s)
(cond ((setq e (car (entsel "\nPick something to exclude: ")))
(setq f "*TEXT,LEADER,MULTILEADER,DIMENSION")
(setq a (cdr (assoc 0 (entget e))))
(sssetfirst
nil
(ssget "_A"
(list (cons 0
(if (wcmatch a "*TEXT")
(vl-string-subst "~*TEXT" "*TEXT" f)
(vl-string-subst (strcat "~" a) a f)
)
)
)
)
)
)
)
(princ)
)