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
Syntax
Parameters
- box
- Type: Tekla.Structures.Geometry3dAABB
The bounding box the current view is zoomed to.
Return Value
Type: BooleanTrue on success.
Examples
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