itacad Posted November 11, 2021 Posted November 11, 2021 Hi, I need to combine two traditional commands: move and copy. I would like to make a selection, remove the objects from the selection (=move), and copy them wherever I want (=copy) Alternative could be to combine the copy command with the delete command and delete the first selected objects after making the necessary copies. Thanks in advance for the help Quote
mhupp Posted November 11, 2021 Posted November 11, 2021 (edited) So copy then with an option to delete original or am i missing something? Make a selection move it to a new location, and then have an option to make copies of that selection else where? Edited November 11, 2021 by mhupp Quote
Steven P Posted November 12, 2021 Posted November 12, 2021 Try this. This is your alternative, copy objects and then delete the originals Note that the 'copy' command doesn't show the copied objects moving about - couldn't remember how to make the loop work apart from how I have it below. (defun c:trythis () (setq sset (ssget)) (setq pt1 (getpoint "Select Base Point:")) (while (setq pt2 (getpoint "Select Next Point or <enter> or <space>:")) (command "copy" sset "" pt1 pt2) ) (command "erase" sset "") ) 1 Quote
eldon Posted November 12, 2021 Posted November 12, 2021 When a command is started and on the command line is "Select objects", there are a number of options, which if you know them, you can just enter the required option, or if you don't know them, enter a "?" and they will be shown. Your problem seems to be easily solved by using existing commands, rather then going to the extra of using lisp. Quote
SLW210 Posted November 12, 2021 Posted November 12, 2021 Just use CUT (CTRL+X) and Paste (CTRL+V), though you wouldn't be able to select a base point, if that's necessary. You might be able create a Macro to Copybase>Select Base Point>Delete>Paste, if you don't want to do it manually. If you want to use COPY, COPY>Select>Pick Base Point>move object to new location>(E)rase>(P)revious>Enter 2 Quote
Steven P Posted November 12, 2021 Posted November 12, 2021 39 minutes ago, SLW210 said: Just use CUT (CTRL+X) and Paste (CTRL+V), though you wouldn't be able to select a base point, if that's necessary. You might be able create a Macro to Copybase>Select Base Point>Delete>Paste, if you don't want to do it manually. If you want to use COPY, COPY>Select>Pick Base Point>move object to new location>(E)rase>(P)revious>Enter That's what I first thought apart from no base point - sometimes that isn't so important though Quote
itacad Posted November 13, 2021 Author Posted November 13, 2021 Thank you Steven P, your lisp is exactly what I need! Unfortunately the visual effect of the copy command is missing (object visible while being copied) but the result which is what matters is excellent! Thanks also to those who participated in the discussion, greetings Quote
Steven P Posted November 13, 2021 Posted November 13, 2021 1 hour ago, itacad said: Thank you Steven P, your lisp is exactly what I need! Unfortunately the visual effect of the copy command is missing (object visible while being copied) but the result which is what matters is excellent! Thanks also to those who participated in the discussion, greetings Unfortunately I couldn't work out how to make the copy loop and to show the objects as they are moving. In the back of my mind I think Lee Mac did this somewhere on his website, but cannot remember where Quote
jonathann3891 Posted November 15, 2021 Posted November 15, 2021 Ever looked into AutoCAD's MOCORO command? FYI MOCORO means Move Copy Rotate. 1 Quote
itacad Posted November 15, 2021 Author Posted November 15, 2021 Thanks to you too, I know that command, but it doesn't do what I need 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.