Saqib_theleo Posted July 27, 2012 Posted July 27, 2012 Hello Everyone, Here is a simple Lisp which can select all Circles in the drawing. (defun c:sac (/ sel1) (setq sel1 (ssget '((0 . "circle")))) (command "move" sel1 "") (princ) ) The problem is, after selecting all circles when I hit enter it can only move them. But I want to keep them selected after I hit enter or space bar, so that I can use any other command on them. If some one can edit it in this way I'll be thankful. Quote
Tharwat Posted July 27, 2012 Posted July 27, 2012 (setq sel (ssget '((0 . "CIRCLE")))) (sssetfirst nil sel) Quote
MSasu Posted July 27, 2012 Posted July 27, 2012 Please check the SSSETFIRST function: (defun c:sac (/ sel1) (setq sel1 (ssget '((0 . "circle")))) (command "move" sel1 "") [color=magenta](sssetfirst nil sel1) [/color] (princ) ) Quote
Saqib_theleo Posted July 27, 2012 Author Posted July 27, 2012 (setq sel (ssget '((0 . "CIRCLE")))) (sssetfirst nil sel) Hi Tharwat, Yes this is what I was looking for. Thank you for your help. Quote
Saqib_theleo Posted July 27, 2012 Author Posted July 27, 2012 Please check the SSSETFIRST function: (defun c:sac (/ sel1) (setq sel1 (ssget '((0 . "circle")))) (command "move" sel1 "") [color=magenta](sssetfirst nil sel1) [/color] (princ) ) Hi MSasu, Thanks to you too for your help. 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.