leonucadomi Posted February 5 Posted February 5 hello: I use this routine Quote (defun c:SIMI ( / sset) (if (/= (setq sset (ssget "_I")) nil) (setq hnd (ssname sset 0)) (setq hnd (car (entsel "\nDS> Select Object Type: "))) ) (if (/= hnd nil) (progn (setq obj (cdr (assoc 0 (entget hnd)))) (setq sset (ssget "_X" (list (cons 0 obj)))) (if (> (sslength sset) 0) (sssetfirst sset sset) ) ) ) (princ) ) In this routine you select an entity and subsequently all entities of the same type in the entire drawing are selected. I would like that instead of selecting the entities of the entire drawing, it would only select those in a previously selected area any comments are welcome Quote
pkenewell Posted February 5 Posted February 5 @leonucadomi Simple. Change: (setq sset (ssget "_X" (list (cons 0 obj)))) to: (setq sset (ssget "_P" (list (cons 0 obj)))) 1 Quote
leonucadomi Posted February 5 Author Posted February 5 5 minutes ago, pkenewell said: @leonucadomi Simple. Change: (setq sset (ssget "_X" (list (cons 0 obj)))) to: (setq sset (ssget "_P" (list (cons 0 obj)))) I'm sorry but it doesn't work Quote
pkenewell Posted February 5 Posted February 5 3 minutes ago, leonucadomi said: I'm sorry but it doesn't work It works for me. If you have a selection made previously, then run this command, it will only select the similar items within the previous selection set. If that is not what you wanted, then you need to explain yourself better. Quote
pkenewell Posted February 5 Posted February 5 If you mean that you want to interactively select the similar items, then just change: (setq sset (ssget "_P" (list (cons 0 obj)))) to (setq sset (ssget (list (cons 0 obj)))) 1 Quote
leonucadomi Posted February 5 Author Posted February 5 33 minutes ago, pkenewell said: If you mean that you want to interactively select the similar items, then just change: (setq sset (ssget "_P" (list (cons 0 obj)))) to (setq sset (ssget (list (cons 0 obj)))) sorry for my translation, I have modified it as you told me and it is precisely what I needed, this is a great help, thank you very much 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.