Code:(defun c:rm (/ ss) (princ "\nSelect Objects to Rotate & Move:\n") (if (setq ss (ssget)) (progn (command "rotate" ss "" "@" pause) (command "move" ss "" pause pause) ) ) (princ) )
Registered forum members do not see this ad.
Got a really simple LISP file that I run which combines the 'move' & 'rotate' commands. What I need is for someone to help me switch this around so that it runs the 'rotate' command first, and then the 'move' one. Here's the contents of the file:
(defun c:mr ()
(princ "\nMove & Rotate:\n")
(setq ss (ssget))
(command "move" ss "" "0" "0")(command "move" ss "" pause pause)(command "rotate" ss "" "@" pause))
Thanks
Code:(defun c:rm (/ ss) (princ "\nSelect Objects to Rotate & Move:\n") (if (setq ss (ssget)) (progn (command "rotate" ss "" "@" pause) (command "move" ss "" pause pause) ) ) (princ) )
Thanks CAB - that's great (almost!).
Only problem is that it doesn't ask me for a base point to rotate from....??
That wasn't in your specifications.
Code:(defun c:rm (/ ss) (princ "\nSelect Objects to Rotate & Move:\n") (if (setq ss (ssget)) (progn (command "rotate" ss "" pause pause) (command "move" ss "" pause pause) ) ) (princ) )



Rooster you do realize CAB just reversed your original LISP
The section in your original LISP wouldn't have asked for a base point either
Code:(command "rotate" ss "" "@" pause))
Not being picky..![]()
![]()
If at first you don't succeed, then maybe failure is more your style.
Can I ask for one last ammendment to this?!
Could the 'move' section of this command use the same base point asked for during the 'rotate' stage? Thanks![]()
Try this:
Code:(defun c:rm (/ ss) (princ "\nSelect Objects to Rotate & Move:\n") (if (setq ss (ssget)) (progn (setq pt (getpoint "\n Select Base point : ")) (command "rotate" ss "" pt pause) (command "move" ss "" pt pause) ) ) (princ) )
No, that works the same as before. It asks me for a base point twice - once to rotate around, and then to move from. What I want is to pick a base point, rotate the object around it, and then go straight to the move command keeping the same base point.....
Registered forum members do not see this ad.
it works as expect here
"That's it. It's one thing for a ghost to terrorize my children, but quite another for him to play my Theremin." Homer Simpson
Dave
Bookmarks