You forgot to close the logical construction:
But you may simplify that as:Code:(ssget '((-4 . "<OR") (0 . "MTEXT")(0 . "TEXT") (-4 . "OR>")))
Regards,Code:(ssget '((0 . "MTEXT,TEXT")))
Mircea

Registered forum members do not see this ad.
Please bear with me, I'm still really green on this.
I'm trying to create a selection set that will choose only text and mtext. However it doesn't seem to be working for me. Is this correct?
This is the complete code I've written, it's meant to just change text sizes that are selected, sort of a dummied down match prop command, as THAT particular command can sometimes do TOO much.Code:setq Tchg (ssget '((-4 . "<AND")(0 . "MTEXT")(0 . "TEXT")))
Later at some point I might try to get it to include multileaders too, but I'll start with the simple stuff first.Code:(defun c:tchg () (setq CMD-ECHO (getvar "cmdecho")) (setvar "cmdecho" 0) (defun GetText () (setq en1 (car (entsel "\nChoose text entity to match with: "))) (setq OLDENT (entget en1)) (setq ENTCHANGE (assoc 40 OLDENT)) (setq ENTCHANGE (cdr ENTCHANGE)) ) ;;End get text (defun GetChange () (prompt "\nSelect all text entities you wish to change: ") (setq Tchg (ssget '((-4 . "<AND")(0 . "MTEXT")(0 . "TEXT"))) ) ) (GetText) ;(GetSize) (GetChange) (repeat (setq n (sslength Tchg)) (setq chg (ssname tchg (setq n (1- n)))) (setq Tval (cdr (assoc 40 (setq ts (entget chg))))) (entmod (subst (cons 40 entchange) (assoc 40 ts) ts)) ) (setvar "cmdecho" CMD-ECHO) )
Silvercloak
You forgot to close the logical construction:
But you may simplify that as:Code:(ssget '((-4 . "<OR") (0 . "MTEXT")(0 . "TEXT") (-4 . "OR>")))
Regards,Code:(ssget '((0 . "MTEXT,TEXT")))
Mircea
Last edited by MSasu; 29th Mar 2012 at 01:02 pm. Reason: code fixed

Thank you, THAT was something they failed to teach me in class. Excellent.
You're welcome!
Regards,
Mircea

One other question that just occured to me. Is it possible to tell it to select by using either pick point OR crossing window or Window?
Silvercloak
Please check the help of SSGET function for available selection methods and combinations; also for filters with wild-characters check the WCMATCH function.
Regards,
Mircea

You should supply the points:
Regards,Code:(if (and (setq point1st (getpoint "\First corner: ")) (setq point2nd (getcorner point1st "\nOther corner: "))) (ssget "_W" point1st point2nd '((0 . "MTEXT, TEXT"))) )
Mircea

Registered forum members do not see this ad.
If will call the function without a method - you may supply filter(s) or not - then the user will be allowed to use any of AutoCAD's standard selections method (i.e. pick, window, crossing, fence).
I suggest you to follow some of the many tutorials available on SSGET function.
Regards,
Mircea
Bookmarks