Lock Shortcut ?

Next
 From:  PaQ
2837.1 
Hello there,

Can figure out how to create a shortcut for the Lock command, anyone has a clue ?
Thanks a lot :)
  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:  BurrMan
2837.2 In reply to 2837.1 
script:moi.geometryDatabase; gd.lock();
  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
2837.3 In reply to 2837.2 
Hi Burr, yup that will work since back some time ago I added "gd" as a global available to scripts that is the same as moi.geometryDatabase

So it can just be:
script:gd.lock();

I generally try not to make scripts that use that though, because they are not compatible with version 1 that does not have "gd" set up as a predefined global variable.

However in this case it's not compatible with v1 anyway since lock is only available in v2.

The "regular" full way would be this:
script:moi.geometryDatabase.lock();

- 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:  BurrMan
2837.4 In reply to 2837.3 
I basically went to the sidepane.htm and started from there as I am not a javascript guy. Started removing things until I got rid of the error. I figured it could be refined more though to do all the if/then stuff that is included in the actual button for proper functionality. couldnt figure that out though. :O
  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
2837.5 In reply to 2837.4 
Hi Burr, yup that is the way to track it down.

The way the button works is it does some different functions if you do Ctrl+click on it (unlock subset) or if you right-click on it (isolate lock - locks everything else than the selection).

You can't really "right-click" on a keyboard shortcut, so probably if you wanted to set those up for keyboard shortcuts they would be separate shortcuts, like one for "L", one for "Ctrl+L", one for "Shift+L", etc...

- 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
 From:  PaQ
2837.6 
Thanks a lot guys :)
  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