Search the Community
Showing results for tags 'selection sets'.
tsotzo posted a topic in AutoLISP, Visual LISP & DCLHi, I am trying something like this: (setq ed (entget (car (entsel)))) (setq lyr (cdr (assoc 8 ed))) (setq clr (cdr (assoc 62 ed))) How can I get a selection set based on layer and color of a given object? Something like: (setq objs (ssget "X" '((cons 8 lyr) (cons 62 clr)) ) ) [i know this is not working I write it just to give the idea.] and then change the objects' layer to "0" and color to 2. Thank you in advance tso
Hi Sirs, I'm just new on using autolisp and still learning so please help me on the dilemma i'm facing. Basically i want to sort a selection set of polyline (rectangle) under the layer of "REF" basing on it's X axis. I copied bits of info around the net but i can't get it work the way i want it to. Here is where i copied some of it. http://forums.augi.com/showthread.php?137837-Sort-Selectionset-by-X-coord (setq plt_set (ssget '((8 . "REF")))) ;select layer "REF" (setq count 1 count1 (sslength plt_set) ss6 (ssadd) ss4 (list (ssname plt_set (1- count))) ) (while (<= (1+
benhubel posted a topic in AutoLISP, Visual LISP & DCLI am writing a routine that requires that I remove objects from a selection set while still keeping the original set around. After running into issues, I created a test routine to see how ssdel is operating. I want it to remove selB from selC, while keeping selA and selD untouched to hold the original selection. It is removing selB from all related selection sets though. Why is it doing this, and how can I fix it? (defun c:TD () ;Test Delete (setq selA(ssget)) ;get base selection A (setq selB(ssget)) ;get selection B to remove from selection C (setq selC selA) ;copies selection A and