Hi,
To select all xrefs in model space, you can first create a string with all xref names separated with commas to be used in the selection set filter.
(setq str "")
(while (setq blk (tblnext "BLOCK" (not blk)))
(if (cdr (assoc 1 blk))
(setq str (strcat str (cdr (assoc 2 blk)) ","))
)
)
(setq ss (ssget "_X" (list '(0 . "INSERT") '(410 . "Model") (cons 2 str))))