Hey Gang
Tried a search found nothing. Is it possible to get a selection set of what was just pasted into drawing? Thanks
Southie
Instead of Ctrl+V, use Ctrl+Shift+V to paste as a block. Then explode it with "L" selection. Now you have pasted objects in "P" selection.
Dev
Tried (ssget "P")) I think i see what you mean even though the sel set is not the entities after paste but what was origanaly selected. In my case this will work but if i wanted to get the new handles after pasting not sure on that.
Thanks
Southie
3wood
Can what you recomended be done thru code? Would like user to just use pasteclip and just drag to where the want it?
Thanks
Southie
If using lisp code, you can record the last entity handle before pasting. Then after pasting, go through entire entity database from the latest entity, comparing with previous record, if is newer, add it to a selection.
@3wood wrote:If using lisp code, you can record the last entity handle before pasting. Then after pasting, go through entire entity database from the latest entity, comparing with previous record, if is newer, add it to a selection.
I think the same can be accomplished without making any comparisons of one thing with another to figure out which is newer -- you should be able to just go to the next until there aren't any more. I'm not in a place where I can test it, but try something like this:
(defun C:PandSS (/ entl ent); = Paste and turn into Selection Set (setq entl (entlast); last object in drawing prior to Paste pss (ssadd); = Pasted-objects Selection Set [initially empty] ); setq (command "_.pasteclip") (while (> (getvar 'cmdactive) 0) (command pause); allows possible scale/rotation options as well as insertion point ); while (while (setq ent (entnext entl)); as long as there's still another object (ssadd ent pss); put it in the selection (setq entl ent); make object just added the base to look for the next after [if any] ); while ); defun
That should leave the pasted objects all saved into the 'pss' selection-set variable, to do with whatever you want.