PDA

View Full Version : ssget to get both text and Mttext?



muck
9th Jan 2007, 09:55 pm
Ver 2007.
I thought that (SETQ S1 (SSGET (list (cons 0 "mtext")(cons 0 "text"))))
would make a selection set that contains both text and mtext. Apparently it
does not do that so what will allow me to make a selection set with
only text and mtext when a mixture of entities are selected.
thank you,

CarlB
9th Jan 2007, 11:46 pm
No you can't have 2 filters for the same group code but other forms are allowed. Both of these should work:

(SETQ S1 (SSGET '( 0 . "mtext,text))))

or

(SETQ S1 (SSGET '((0 . "*text))))

Alan Cullen
10th Jan 2007, 12:15 am
Try the following code.....

(setq ss (ssget '((-4 . "<OR")
(-4 . "<AND") (0 . "TEXT") (-4 . "AND>")
(-4 . "<AND") (0 . "MTEXT") (-4 . "AND>")
(-4 . "OR>"))
))

Hope that helps...:)

CAB
11th Jan 2007, 01:19 pm
As you see CarlB's is much cleaner but be aware that (SETQ S1 (SSGET '((0 . "*text)))) will pick up "RTEXT" as well as text & mtext.