Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

selection set continued

5 REPLIES 5
Reply
Message 1 of 6
gcsjlewis
273 Views, 5 Replies

selection set continued

What I am trying to do is create a selection set of the "y" values of text.  I've started by pulling out all the text on the drawing, but I need it to continue to grab only the "y" values of the text on the drawing.

 

(setq alltext (ssget "_x"  (list '(0 . "TEXT")) 
        )  
    )     

 

I've tried a bunch of different things but I am still new to lisp.

5 REPLIES 5
Message 2 of 6
_Tharwat
in reply to: gcsjlewis

Try it like this ..

 

(setq alltext (ssget "_x"  (list '(0 . "TEXT") (cons 1 "*y*"))))

 

Message 3 of 6
gcsjlewis
in reply to: _Tharwat

Nope, I get

; error: bad argument type: lselsetp nil

________________________________
The information contained in this message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this document in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately, and delete the original message.
Message 4 of 6
hmsilva
in reply to: gcsjlewis


@gcsjlewis wrote:

What I am trying to do is create a selection set of the "y" values of text.  I've started by pulling out all the text on the drawing, but I need it to continue to grab only the "y" values of the text on the drawing.

 

(setq alltext (ssget "_x"  (list '(0 . "TEXT")) 
        )  
    )     

 

I've tried a bunch of different things but I am still new to lisp.


manamalewis,

 

"create a selection set of the "y" values of text"

 

Do you mean a list with all the "y" values from each text insertion point?
if I understood correctly, perhaps something like this

 

(if
  (setq
    alltext (ssget "_X" (list (cons 0 "TEXT") (cons 410 (getvar "CTAB"))))
  )
   (progn
     (setq itm 0
	   num (sslength alltext)
     );; setq
     (while (< itm num)
       (setq texty (caddr (assoc 10 (entget (ssname alltext itm)))))
       (setq alltexty (append alltexty (list texty)))
       (setq itm (1+ itm))
     );; while
   );; progn
);; if

hope that helps
Henrique

EESignature

Message 5 of 6
pbejse
in reply to: gcsjlewis


@gcsjlewis wrote:

What I am trying to do is create a selection set of the "y" values of text.  I've started by pulling out all the text on the drawing, but I need it to continue to grab only the "y" values of the text on the drawing.

 


"y" values.. <-- i wonder what that is? 

Message 6 of 6
_Tharwat
in reply to: gcsjlewis


@gcsjlewis wrote:
Nope, I get

; error: bad argument type: lselsetp nil



That error message is not belong to my line of code but related to the iteration of of your code , so post your code

to allow us to check it out for you .

 

Tharwat

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost