If this "and non off the xref layers" = "and none of the xref layers" then all you do is add "~*|*,1*" to your name filter.
Using Michael's code:
(defun c:mlf (/ dict xdict lst x)
(setq xdict (vlax-vla-object->ename
(vla-getextensiondictionary
(vla-get-layers (vla-get-activedocument (vlax-get-acad-object)))
)
)
)
(setq
dict (if (setq dict (dictsearch xdict "ACAD_LAYERFILTERS"))
(cdr (assoc -1 dict))
(dictadd xdict
"ACAD_LAYERFILTERS"
(entmakex '((0 . "dictionary") (100 . "AcDbDictionary") (280 . 0) (281 . 1)))
)
)
)
(foreach x '(;;name Lay col lt flags lw plot
("Group_00" "~*|*,0*" "*" "*" 0 "*" "*")
("Group_10" "~*|*,1*" "*" "*" 0 "*" "*")
("Group_20" "~*|*,2*" "*" "*" 0 "*" "*")
("Group_30" "~*|*,3*" "*" "*" 0 "*" "*")
("Group_40" "~*|*,4*" "*" "*" 0 "*" "*")
("Group_50" "~*|*,5*" "*" "*" 0 "*" "*")
("Group_60" "~*|*,6*" "*" "*" 0 "*" "*")
("Group_70" "~*|*,7*" "*" "*" 0 "*" "*")
("Group_80" "~*|*,8*" "*" "*" 0 "*" "*")
("Group_90" "~*|*,9*" "*" "*" 0 "*" "*")
)
(dictadd dict
(car x)
(entmakex (list '(0 . "xrecord")
'(100 . "AcDbXrecord")
'(280 . 1)
(cons 1 (car x))
(cons 1 (cadr x))
(cons 1 (caddr x))
(cons 1 (nth 3 x))
(cons 70 (nth 4 x))
(cons 1 (nth 5 x))
(cons 1 (nth 6 x))
)
)
)
)
(princ)
)
(c:mlf)