0 Members and 1 Guest are viewing this topic.
(setq count 0) (repeat (sslength them) (setq ent (entget (ssname them count)) pt_lst nil) (cond (/= "TEXT" (cdr (assoc 8 ent))) (foreach a ent (if (= (car a) 10) (setq pt_lst (append pt_lst (list (cdr a)))) ) ) );; end cond(setq count (+ 1 count)));;; end repeat
(vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))
(mapcar 'cadr (ssnamex ss))
(defun c:test(/ i ss ent elst pt_lst) (defun get_vertex (elst) (mapcar 'cdr (vl-remove-if-not '(lambda (x) (= 10 (car x))) elst)) )(setq ss (ssget))(setq i -1)(while (setq ent (ssname ss (setq i (1+ i)))) (if (/= "TEXT" (assoc 8 (setq elst (entget ent)))) (setq pt_lst (cond (pt_lst (append (get_vertex elst) pt_lst)) ((get_vertex elst)))) ))(princ))
(if (setq ss (ssget '((8 . "~TEXT")))) (progn ;;repeat (setq n -1) (repeat (sslength ss) (setq e (ssname ss (setq n (1+ n)))) (setq out1 (cons e out1)) ) (setq n -1) ;;while (while (setq e (ssname ss (setq n (1+ n)))) (setq out2 (cons e out2)) (ssdel e ss) ) ;;mapcar (setq out3 (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))) ))
I don't normally use a repeat method to shuffling through SelectionSets, I normally convert the set into a list of entities which is much more manageable, as lists are the basis of LISP programming.