ViewHandlerZoomToBoundingBox Method (AABB)

Zooms the current model view.

Namespace:  Tekla.Structures.Model.UI
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2023.0.3
public static bool ZoomToBoundingBox(
	AABB box


Type: Tekla.Structures.Geometry3dAABB
The bounding box the current view is zoomed to.

Return Value

Type: Boolean
True on success.
In the following example a part is picked and all the visible views are zoomed using the part's bounding box as a parameter.
using Tekla.Structures.Model;
using Tekla.Structures.Model.UI;
using Tekla.Structures.Geometry3d;

public class Example
       public void Example1()
           Picker MyPicker = new Picker();
           Part PickPart = MyPicker.PickObject(Picker.PickObjectEnum.PICK_ONE_PART) as Part;
           AABB PartBoundingBox = new AABB();

           if (PickPart != null)
               Solid PartSolid = PickPart.GetSolid();
               PartBoundingBox.MaxPoint = PartSolid.MaximumPoint;
               PartBoundingBox.MinPoint = PartSolid.MinimumPoint;

           ModelViewEnumerator ViewEnum = ViewHandler.GetVisibleViews();

           while (ViewEnum.MoveNext())
               View ViewSel = ViewEnum.Current;
               ViewHandler.ZoomToBoundingBox(ViewSel, PartBoundingBox);
See Also
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.