How to move recently pasted objects?

How to move recently pasted objects?

rjonesEZYD6
Observer Observer
583 Views
11 Replies
Message 1 of 12

How to move recently pasted objects?

rjonesEZYD6
Observer
Observer

After copying and pasting multiple objects from one drawing to another, I want to immediately move those objects. However, AutoCAD makes me select what was just pasted first, and then I can move them. 

 

 For example, I copy pipe from drawing 1 at 0,0,0

rjonesEZYD6_0-1732131093439.png

 

 

Then i paste them into drawing 2 at 0,0,0

rjonesEZYD6_1-1732131123684.png

 

I want to move what was pasted. I must select objects first 

rjonesEZYD6_2-1732131261393.png

 

 

then i can move

rjonesEZYD6_3-1732131300680.png

 



This can be tedious especially when objects overlap or lots of small objects like pipe.

 

Is there command to similar "p" for previous that selects what was just pasted from the clipboard without having to select each and every object that was just pasted?  That way, if I start the move command, for example, and enter a "select just pasted objects" command, AutoCAD immediately selects what was just pasted instead of having to select them all over again.

 

If there isn't, can you invent it?

 

Best

0 Likes
584 Views
11 Replies
Replies (11)
Message 2 of 12

pendean
Community Legend
Community Legend
Nothing built-in does that: unless as part of the "paste" you start using the placement tools in the program like the FROM osnap and/or OTRACK for example. Any reason you've not explored or don't wish to use those tools?

Otherwise... are you willing to give up core tools for LISP or other different methods?
0 Likes
Message 3 of 12

imadHabash
Mentor
Mentor

Hi,

For Now .. what you're asking for not availabel.

BUT .. Since you know that you need to get back for what you pasted before, how about insert those things as a blocks.

 

Imad Habash

EESignature

Message 4 of 12

rjonesEZYD6
Observer
Observer
that's a good idea, but I have to run reports on the objects (lengths, material, weight, etc) and I'll need the meta data from the fab database in order to run that.
0 Likes
Message 5 of 12

pkenewell6347
Advocate
Advocate

Try This: Use this command in place of the PASTECLIP command. with this command you should be able to use "MOVE > P" afterwards.

(defun c:MARKPASTE ( / pjk-MarkLastEnt pjk-Buildss le ss)

   (defun pjk-MarkLastEnt (/ e en)
      (or
         (and
            (setq en (entlast))
            (while (setq e (entnext en))(setq en e))
         )
          (progn
             (setq en (entmakex (list (cons 0 "POINT") (cons 100 "AcDbEntity") (cons 100 "AcDbPoint")(cons 10 '(0. 0. 0.)))))
             (entdel en)
          )
      )
      en
   )

   (defun pjk-Buildss (en / ss)
      (and en
         (while (setq en (entnext en))
            (or ss (setq ss (ssadd)))
            (if (not (wcmatch (cdr (assoc 0 (entget en))) "ATTRIB,VERTEX,SEQEND"))(ssadd en ss))
         )
      )
      ss
   )

   (setq le (pjk-MarkLastEnt))
   
   (command "._PASTECLIP")
   (while (= (logand (getvar "cmdactive") 1) 1)
		(command pause)
	)

   (setq ss (pjk-Buildss le))

   (command "._SELECT" ss "")
   
   (princ)
)

 

0 Likes
Message 6 of 12

Kent1Cooper
Consultant
Consultant

@rjonesEZYD6 wrote:

.... Is there command to similar "p" for previous that selects what was just pasted from the clipboard without having to select each and every object that was just pasted?  ....


When it's a single object [as it seems to be in you images -- a Block with Attributes?], there is of course L for Last.

 

When it's more than one, if you know how many, you can use my (ln) function defined here:

;;  LastNo.LSP [function name: LN]
;;  To select the Last user-specified Number of Entities
;;  Use by typing (LN qu) where 'qu' is integer quantity of entities desired
;;  Kent Cooper; last edited July 2009
;;
(defun LN (qu / sset ssn)
  (setq sset (ssadd))
  (repeat qu
    (if (entlast)
      (progn
        (ssadd (entlast) sset)
        (entdel (entlast))
      ); progn
    ); if
  ); repeat
  (if sset
    (progn
      (setq ssn (sslength sset))
      (while (>= (setq ssn (1- ssn)) 0)
        (entdel (ssname sset ssn))
        (redraw (entlast) 3)
      ); while
    ); progn
  ); if
  sset
); defun

[Line 3 tells you how to use it, at the point where a command is asking for object selection -- be sure to include the parentheses.]

Kent Cooper, AIA
Message 7 of 12

cadffm
Consultant
Consultant

Hi,

 

I don't think there is a way (except you paste as block and using L for Last object).

 

You can create a macro what can paste and select the objects, so you have your special "paste" procedure.

 

But why you paste ar 0,0 if you want to move instead to place it where you want?

Sebastian

0 Likes
Message 8 of 12

cadffm
Consultant
Consultant

I hate this new forum design (Adesk test these days) on my mobile, I often oversee already existing replies. Grrh

 

Sebastian

0 Likes
Message 9 of 12

Kent1Cooper
Consultant
Consultant

@cadffm wrote:

.... I don't think there is a way (except you paste as block and using L for Last object). ....


A command could pretty easily be defined to use PASTEBLOCK, then get the wacky Block name that assigns, then EXPLODE the resulting Block, then PURGE the wacky Block definition, then SELECT or (ssget) the PREVIOUS selection which will be the result of the Exploding.  @rjonesEZYD6, do you think that would work for you?

Kent Cooper, AIA
0 Likes
Message 10 of 12

Moshe-A
Mentor
Mentor

@cadffm 

 


@cadffm wrote:

I hate this new forum design (Adesk test these days) on my mobile, I often oversee already existing replies. Grrh

 


i hate it too, it changed (suddenly 😀) on my mobile and on my home laptop (win 11) but still appears old design on my office machine (win 10)

 

 

0 Likes
Message 11 of 12

komondormrex
Mentor
Mentor

custom command 'sla' will select last added entities in a document or across documents in case of copy/pasting (should be loaded in target document).

best way the command/program is loaded in all document opened/be opened is to load it via (vl-load-all "sla").

works in noun->verb scenario.

not immaculate but may be  of help in your work process, see gif attached.

 

komondormrex_0-1732176958554.gif

 

0 Likes
Message 12 of 12

ВeekeeCZ
Consultant
Consultant

@cadffm wrote:

I hate this new forum design (Adesk test these days) on my mobile, I often oversee already existing replies. Grrh


 

Try a different browser if you hate it more than you love your browser. Works for me every time...