SSGET Problem by Layer name

SSGET Problem by Layer name

neam
Collaborator Collaborator
146 Views
3 Replies
Message 1 of 4

SSGET Problem by Layer name

neam
Collaborator
Collaborator

Hi everyone:

I want to select the texts and lines that have the desired characteristics in the specified layer,
but I am having trouble filtering them:

 

(setq layerindex (itoa (getint "Enter Layer Index Number: ")))
(setq layername (strcat "Number Vertex " layerindex))

(setq sstotal (ssget "X" '((-4 . "<OR")
(-4 . "<AND") (list '(0 . "TEXT") (cons 62 256) (cons 8 layername)) (-4 . "<AND")
(-4 . "<AND") (list '(0 . "LINE") (cons 62 22) (cons 8 layername)) (-4 . "<AND")
(-4 . "OR>"))
)
)

 

Thank you for guiding me.

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

CodeDing
Advisor
Advisor

@neam ,

 

Update both of your Ending -4 groups by switching the side the bracket is on:

 

(-4 . "AND>")

 

Best,

~DD

0 Likes
Message 3 of 4

neam
Collaborator
Collaborator

Hi

You are absolutely right, but it still doesn't work.

layername=> "Number Vertex 2"

 

(setq sstotal (ssget "X" '((-4 . "<OR")
(-4 . "<AND") (list '(0 . "TEXT") (cons 62 256) (cons 8 layername)) (-4 . "AND>")
(-4 . "<AND") (list '(0 . "LINE") (cons 62 22) (cons 8 layername)) (-4 . "AND>")
(-4 . "OR>"))
)
)

0 Likes
Message 4 of 4

pbejse
Mentor
Mentor
Accepted solution
(setq sstotal
       (ssget "X"
	      (list '(-4 . "<OR") '(-4 . "<AND")
	        '(0 . "TEXT") (cons 62 256) (cons 8 layername)
		'(-4 . "AND>")
		'(-4 . "<AND")
		'(0 . "LINE") (cons 62 22) (cons 8 layername)'(-4 . "AND>")'(-4 . "OR>")
	       )
       )
)