Set Zoom to 100% ?

 From:  Michael Gibson
3913.4 In reply to 3913.3 
Hi NightCabbage - the pixel dimensions of the viewport are not currently accessible to scripts, so you'll need to find some other way of getting that info - maybe try a screen capture utility and see what size image it grabs from a viewport window or if you have Visual Studio installed use Spy++ from there to find the pixel width and height of the viewport's window.

Then plug in the smaller of the width and height into this script, putting that number in place of where it says 482 currently:

script: /* Set top viewport zoom to 1 pixel = 1 unit */ var viewport_pixel_size = 482; var vp = moi.ui.mainWindow.viewpanel.getViewport('Top'); vp.fieldOfViewAngle = viewport_pixel_size;

Set that script up on a shortcut key and then when you trigger it, it should zoom the top viewport to be 1 pixel = 1 unit.

Note that if you do anything that changes the viewport size like sizing the main window or switching from split view to a maximized top view, that it will no longer be 1 pixel = 1 unit after that.

Hope this helps!

- Michael