Std ViewFitSelection

Description
The Std ViewFitSelection command zooms and pans the camera so that all selected objects fit inside the active 3D view. This command is needed in cases where for some reason (program crash or as a result of user actions) your object or objects has gone far beyond the boundaries of the current 3D View, so that it cannot be found using 3D navigation.

Usage

 * 1) Select one or more objects.
 * 2) There are several ways to invoke the command:
 * 3) * Press the button.
 * 4) * Select the option from the menu.
 * 5) * Select the option from the 3D view context menu.
 * 6) * Use the keyboard shortcut: then.

Scripting
FreeCAD Scripting Basics.

To change the view to 'fit selection' the method of the FreeCADGui object can be used. This method is not available if FreeCAD is in console mode.