I found this lsp on the www a while back.
It moves all attached x-ref's to a specific layer.
And it is working great .but it...moves only x-ref in ms.
How can this be modified (if allowed by creator) that it all attached x-ref's MS&PS are moved to the specific layer.?
;; XRLC.LSP ; Scot Harris 11-2-2011
;; X-Ref Layer Change. Gathers all xrefs in the drawing file and moves
;; these objects into a user specified layer.
(defun XRLC ( / a d n s )
(if (not (tblsearch "layer" "RENAMEXREFLayer$"))
(entmake
(list
(cons 0 "Layer")
(cons 100 "AcDbSymbolTableRecord")
(cons 100 "AcDbLayerTableRecord")
(cons 2 "RENAMEXREFLayer$")
(cons 70 0)
(cons 62 7)
(cons 6 "Continuous")
)
)
)
(setq s nil d nil n 0)
(setq a "RENAMEXREFLayer$")
(if (= a "") (setq a "0") );if
(if (tblsearch "LAYER" a)
(progn
(while (setq d (tblnext "BLOCK" (not d)))
(if (assoc 1 d)
(progn
(setq s (ssget "x" (list (cons 0 "INSERT") (assoc 2 d) )))
(setvar "CMDECHO" 0)
(command ".chprop" s "" "Layer" a "")
(setvar "CMDECHO" 1)
(setq n (+ n (sslength s)) s nil)
);progn
);if
);while
(if (> n 0)
(princ (strcat
"\n " (itoa n) " X-Ref object(s) moved to layer \"" (strcase a) "\". "))
(princ "\n No X-Ref objects found in this file. ")
);if
);progn
(princ (strcat
"\n Specified layer \"" (strcase a) "\" not found in this file. "))
);if
(setq a nil d nil n nil)(princ)
);endXRLC