Thanks Grrr1337
Both solutions working very well
No problem. I've got null experience when dealing with xref layers, so I'm happy to learn something new by a little practice.
Much more elegant than what I as going to suggest, my suggestion was going to be to see if the layername has | in it, if it does, it is an xRef layer since you can't add that character yourself to layer names.
I guess that the name wcmatching approach is rarely used because...
_$ (vla-Add (vla-get-Layers (vla-get-ActiveDocument (vlax-get-acad-object))) "MyNew|Layer")
#<VLA-OBJECT IAcadLayer 00000093e05a3198>
One could add programatically layer with a "xref" name.