Centre Selection

 From:  Michael Gibson
5392.4 In reply to 5392.3 
Hi danperk - this version will do it to a 2D view as well:

script: /* Center view on selection, no zoom */ var objs = moi.geometryDatabase.getSelectedObjects(); if ( objs.length > 0 ) { moi.ui.getActiveViewport().targetPt = objs.getBoundingBox().center; }

That will work on either a 2D or 3D view, if you have a maximized view it will do that maximized one and if you're in Split view mode it will do the view that the mouse is currently over top of or the one that was last clicked in if the mouse is not over top of any view at that moment.

- Michael