Glad it works for you autocart.
Theres alot of good examples of how to create layer filter by smart coders at the swamp, CT & augi. But i personally have not found a solution how to set the layer filter current in the past. you expect this (command "-layer" "filter" "set" "No_Xref_Layers" "")
to work, but its not.
Cheers