ssget text with height of..

ssget text with height of..

Anonymous
Not applicable
1,094 Views
3 Replies
Message 1 of 4

ssget text with height of..

Anonymous
Not applicable

Can someone please help me understand this? 
I am trying to select all text+mtext with text height no more than 250, then change it's style.

 

The part I seem to be tripping up on (at the moment at least) is the text height - "(40 . 250.0)".  
I'm getting "Error: bad argument type: consp 250.0".  

 

(setq ss3 (ssget "X" (list (cons 0 "TEXT,MTEXT")(40 . 250.0)(-4 "NOT>")(cons 410 (getvar "ctab")))))
(if ss3
	(progn
		(setq C 0)
		(repeat (sslength ss3)
			(setq entx (ssname ss3 C))
			(setq ent (entget entx))
			(setq ent (subst (cons 7 "RMS - 1.8mm")(assoc 7 ent) ent))
			(entmod ent)
			(setq C (+ C 1))
		); repeat
	); progn
); if


Thanks

0 Likes
Accepted solutions (1)
1,095 Views
3 Replies
Replies (3)
Message 2 of 4

CodeDing
Advisor
Advisor

@Anonymous ,

 

Declare these as lists by adding the QUOTE in front of them. That should do it

(cons 0 "TEXT,MTEXT") '(-4 . "<") '(40 . 250.0)

Best,

~DD

0 Likes
Message 3 of 4

Anonymous
Not applicable

UPDTAE:

 

I've already solved the error I was getting by making this change:

(setq ss3 (ssget "X" (list (cons 0 "TEXT,MTEXT")(cons 40 250.0)(cons 410 (getvar "ctab")))))

All i need now is to figure out how to make it select text LESS than 250..

0 Likes
Message 4 of 4

Anonymous
Not applicable
Accepted solution

I think I got it!

(setq ss3 (ssget "X" (list (cons 0 "TEXT,MTEXT")'(-4 . "<")(cons 40 250.0)(cons 410 (getvar "ctab")))))