Framing camera rotation around selected object + centering view

 From:  vic
11112.2 In reply to 11112.1 
The next script will help you.

MoveTargetToObjectsV2 – Rhino-like command; moves a viewport target's position to the center of the bounding box of selected objects.

Alt+Q script:var objs = moi.geometryDatabase.getSelectedObjects(); if ( objs.length > 0 ) { moi.ui.mainWindow.viewpanel.getViewport('3D').targetPt = objs.getBoundingBox().center; }