Reset view command or script

Next
 From:  Matadem
11336.1 
Good day.

I am pretty sure I had this once....looking for it I cannot find it.

Is there a command to reset your view (like hitting the reset button?)
and can it be done that it does not zoom at a 100%?

Thank you!
  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
11336.2 In reply to 11336.1 
Hi Matadem,

re:
> Is there a command to reset your view (like hitting the reset button?)

Reset the active view (same as pushing "Reset" button on viewport bottom toolbar):

script: moi.ui.getActiveViewport().reset();

Reset all views (same as right-clicking "Reset" button on viewport bottom toolbar or using View > "Reset all" button on side pane):

script: moi.view.resetAll();


> and can it be done that it does not zoom at a 100%?

You could add a call to viewport.zoom( 1.1 ) if you wanted it to zoom out a little after the reset.

Like this:
script: v = moi.ui.getActiveViewport(); v.reset(); v.zoom( 1.1 );


- 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:  Matadem
11336.3 
Thank you!
  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:  Mik (MIKULAS)
11336.4 In reply to 11336.3 
Very useful.
Thank you.
Mik
  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:  Matadem
11336.5 
Good day.

Question...I have changed to shortcut to use the script which works perfectly.

but everytime I close and open Moi the shortcut is changed back to an old command?

I use c - chamfer and changed chamfer to the new reset script.

Tnx.
  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
11336.6 In reply to 11336.5 
Hi Matadem, shortcuts are saved in the moi.ini file when MoI closes.

Do you possibly have multiple instances of MoI running when you set up the shortcut?

If so then close all but one instance, edit the keyboard shortcut and then close the last instance so that it can write out settings to the moi.ini file.

If that isn't it then have you possibly set the moi.ini file to be read only?

- 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:  shayno
11336.7 In reply to 11336.5 
You may have to resave your open template file so it saves it
  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