Jump to content

move + copy


itacad

Recommended Posts

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

Link to comment
Share on other sites

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 by mhupp
Link to comment
Share on other sites

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 "")
)

 

  • Like 1
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

  • Like 2
Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...