I wonder why the ~name1,~name2 filter would not work?
The pattern argument for
wcmatching (I believe the underpinning for ssget filtering) functions akin to an 'OR', not an 'AND'.
For example, if you had inserts by the names of "A", "B" and "C"
(ssget "x" '((0 . "insert")(2 . "~A,~B,~C"))) would actually select them all (because "A" matches "~B" etc).
In order to achieve what you intended you would have to do something like:
'( (0 . "insert")
(-4 . "<and")
(2 . "~A")
(2 . "~B")
(2 . "~C")
(-4 . "and>")
)
)
Thus, given a variable
xref_names that's self describing:
(interactive)
'((0 . "insert")(-4 . "<and"))
'((-4 . "and>"))
)
)
(non-interactive)
'((0 . "insert")(-4 . "<and"))
'((-4 . "and>"))
)
)
Of course, only applicable if xrefs are actually present in the drawing, in the interests of brevity <something I'm not usually known for> that (pre)determination not detailed here.
All that said, the
(-4 . "<not") ... (-4 . "not>") alternative Lee detailed would be the route I'd suggest -- just thought I'd respond to your "wonder why ..." musing.
Cheers.