Saqib_theleo Posted July 17, 2012 Posted July 17, 2012 Hi there all, I need a lisp which can move selected objects on specified distance. I want to move selected object or objects 1000 units on right side which is -X axis. Please make it this way so that after this Lisp command I select the objects which I need to be moved on 1000 units right and then after hitting enter or space bar all selected objects should move 1000 units right. Hope you will understand. If someone can help, I'll be thankful. Quote
MSasu Posted July 17, 2012 Posted July 17, 2012 You may try to adjust the routine from this previous thread. Quote
Tharwat Posted July 17, 2012 Posted July 17, 2012 (defun c:Test (/ ss ) (if (setq ss (ssget "_:L" )) (vl-cmdf "_.move" ss "" "_non" '(0. 0. 0.) "_non" '(1000. 0. 0.)) ) (princ) ) Quote
Saqib_theleo Posted July 17, 2012 Author Posted July 17, 2012 (defun c:Test (/ ss ) (if (setq ss (ssget "_:L" )) (vl-cmdf "_.move" ss "" "_non" '(0. 0. 0.) "_non" '(1000. 0. 0.)) ) (princ) ) Hi Tharwat, This is exactly what I needed, thank you for understanding my need and making this Lisp for me. Have good time. Thanks again. Quote
Tharwat Posted July 17, 2012 Posted July 17, 2012 Hi Tharwat, This is exactly what I needed, thank you for understanding my need and making this Lisp for me. Have good time. Thanks again. You're welcome anytime . Quote
BIGAL Posted July 18, 2012 Posted July 18, 2012 An old question why not CHX CHY CHZ and ask for space rather than hard code. (defun c:CHX (/ ss ) (setq diff (Getreal "\nEnter distance required" )) (if (setq ss (ssget "_:L" )) (vl-cmdf "_.move" ss "" "_non" '(0. 0. 0.) "_non" '(diff 0. 0.)) ) (princ) CHY '(0. diff 0.) ) Version 2, 1 spacing per session (if (= diff nil) (setq diff (Getreal "\nEnter distance required" )) ) (if (setq ss (ssget "_:L" )) (vl-cmdf "_.move" ss "" "_non" '(0. 0. 0.) "_non" '(diff 0. 0.)) ) Like the selection set my old version was pick pick pick 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.