Highlight last item created with Copy

 From:  Michael Gibson
1270.2 In reply to 1270.1 
Hi Marc, it is kind of tough to say in some of these cases.

For example, one use of copy might be to make a kind of quick "backup" of an object off to the side somewhere, and then continue working on the object at hand.

It is possible to set up a keyboard shortcut that will get the selection set up like you want though - to do that use this script:

code:
script:var gd = moi.geometryDatabase; gd.deselectAll(); var a = moi.command.lastCommandRevisionStart; var b = moi.command.lastCommandRevisionEnd; var objects = gd.getObjects(); for ( var i = 0; i < objects.length; ++i ) { var obj = objects.item(i); if ( obj.databaseRevision > a && obj.databaseRevision <= b ) obj.selected = true; }


That should work with any command, to select just the new objects that were created by the command and deselect everything else.

It should also be possible to customize just Copy itself to work like you want, let me know if you want a version that does that.

- Michael