squareknees Posted July 9, 2015 Share Posted July 9, 2015 I have worked in AutoCAD for 15 years and I never mastered writing code. I love the lisp routines that I have found and use on a regular basis. I always thought that the copy command should have a rotate option. I know that in express tools has the 'move copy rotate' command but it is a pain to use. I remember when you had to tell the copy command that you wanted to do multiple copies then they added this additional information to automatically do it. Would it be possible to add another layer of code that would give you the option to rotated the copied object from a pick point. If the copy command is a rectangular array can't they add the polar array to it too? Thanks squareknees Quote Link to comment Share on other sites More sharing options...
jonathann3891 Posted July 9, 2015 Share Posted July 9, 2015 See if this will work for you. It not fancy, but should do the trick. (defun c:cr () (princ "\nCopy, & Rotate:\n") (setq ss (ssget)) (command "copy" ss "" "0" "0")(command "move" ss "" pause pause)(command "rotate" ss "" "@" pause)) Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 9, 2015 Share Posted July 9, 2015 Could you not use the Copy option of the Rotate command? Command: ROTATE Current positive angle in UCS: ANGDIR=counterclockwise ANGBASE=0 Select objects: Specify opposite corner: 1 found Specify base point: Specify rotation angle or [[color=red]Copy[/color]/Reference] <0>: C [color=red]Rotating a copy of the selected objects.[/color] Quote Link to comment Share on other sites More sharing options...
jonathann3891 Posted July 9, 2015 Share Posted July 9, 2015 Added an error trap to the code I posted above (defun c:test (/ *error*) (defun *error* ( msg ) (if (not (member msg '("Function cancelled" "quit / exit abort"))) (princ (strcat "\nError: " msg)) ) (princ) ) (princ "\nCopy & Rotate:\n") (setq ss (ssget)) (command "copy" ss "" "0" "0") (command "move" ss "" pause pause) (command "rotate" ss "" "@" pause) ) (princ) Quote Link to comment Share on other sites More sharing options...
squareknees Posted July 9, 2015 Author Share Posted July 9, 2015 Wow I didn't even realize that there was a copy option in the rotate command. I guess I am not use to reading the command line since I just go through the motions that I always have. Now I just have to remember that if I want to copy something and rotate it I have to use the rotate command. Thank you so much that has bugged me for awhile. I guess instead of going through the motions I need to actually read the command line! Quote Link to comment Share on other sites More sharing options...
tombu Posted July 9, 2015 Share Posted July 9, 2015 Could you not use the Copy option of the Rotate command? http://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/AutoCAD-Core/files/GUID-385D1161-6A07-432E-B69B-71C7D19409F5-htm.html or MOCORO (Express Tool) Moves, copies, rotates, and scales selected objects with a single command. Use MOCORO as a convenient method that combines the most commonly used modification commands. Options Move Moves objects Copy Makes multiple copies of objects Rotate Rotates objects Scale Dynamically scales objects Base point Specifies a new base point for the next modify option Undo Reverses the previous operation Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted July 9, 2015 Share Posted July 9, 2015 http://knowledge.autodesk.com/support/autocad/learn-explore/caas/CloudHelp/cloudhelp/2015/ENU/AutoCAD-Core/files/GUID-385D1161-6A07-432E-B69B-71C7D19409F5-htm.htmlor MOCORO (Express Tool) Moves, copies, rotates, and scales selected objects with a single command. I know that in express tools has the 'move copy rotate' command but it is a pain to use. Wow I didn't even realize that there was a copy option in the rotate command.I guess I am not use to reading the command line since I just go through the motions that I always have. Now I just have to remember that if I want to copy something and rotate it I have to use the rotate command. Thank you so much that has bugged me for awhile. I guess instead of going through the motions I need to actually read the command line! You're most welcome! - A custom command could of course be created to allow you to perform the same operation without typing the 'C' for copy, but I prefer to suggest an out-of-the-box solution first if appropriate. Lee Quote Link to comment Share on other sites More sharing options...
catoscuro Posted July 11, 2015 Share Posted July 11, 2015 I use this macro and made a button. ^C^C_select;\_copy;_p;;\@;_rotate;_p;;@;n;_move;_p;;\\;; Quote Link to comment Share on other sites More sharing options...
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.