wanted: Select after creation
All  1-2  3-7

Previous
Next
 From:  Nick (BODINI)
1793.3 In reply to 1793.2 
D'oh. I totally missed that. Thanks.

-Nick
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  manz
1793.4 In reply to 1793.3 
Hi Nick,

I just noticed with this script that it does not de-select all objects first, (you may have an object selected during the creation of the new object) so, you could actually have more than the last created object(s) selected after the script as run
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
1793.5 In reply to 1793.4 
Hi Steve, Hi Nick - if you would always like to have the created objects be the exclusively selected objects (with everything else deselected) instead of being added to the current selection, then use this script instead:
code:
script:moi.geometryDatabase.deselectAll(); var a = moi.command.lastCommandRevisionStart; var b = moi.command.lastCommandRevisionEnd; var objects = moi.geometryDatabase.getObjects(); for ( var i = 0; i < objects.length; ++i ) { var obj = objects.item(i); if ( obj.databaseRevision> a && obj.databaseRevision <= b ) obj.selected = true; }

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Nick (BODINI)
1793.6 
Thanks. :-)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  manz
1793.7 In reply to 1793.5 
Hi Micheal,

Thanks.

It is not a script I use, but just added it on my setup to check before posting.
I did not want Nick to find out later he may be moving (or whatever) other previously selected objects after running the script. I think automatically de-selecting all before is a safer option (IMHO)


- Steve
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-2  3-7