View Class |
The View class contains methods related to views.
Inheritance Hierarchy
Namespace: Tekla.Structures.Model.UI
Assembly: Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2023.0.3
Syntax
The View type exposes the following members.
Constructors
Properties
Name | Description | |
---|---|---|
CurrentRepresentation |
Gets or sets the current representation.
| |
DisplayCoordinateSystem | The local coordinate system for the display. | |
DisplayType | The display plane type. | |
Identifier | The view identifier. | |
Name | The name of the view. 84 characters at most. | |
SharedView |
The property which tells if the view is shared.
The value is meaningful only when the model is shared.
| |
ViewCoordinateSystem |
The local coordinate system for the view.
Can be set when creating a view.
The origin is always set to zero.
| |
ViewDepthDown | The view depth down. | |
ViewDepthUp | The view depth up. | |
ViewFilter | The name of the view filter. 256 characters at most. | |
ViewProjection | The view projection type. | |
ViewRendering | The view rendering type. | |
VisibilitySettings |
The property which tells the view visibility settings for objects.
| |
WorkArea | The view working area. |
Methods
Name | Description | |
---|---|---|
Delete | Deletes the view. | |
GetClipPlanes | Returns all the clip planes of the view. | |
Insert | Inserts a new view to the model. | |
IsPerspectiveViewProjection | Tells whether the view projection is a perspective projection. | |
IsVisible | Tells whether the view is currently visible. | |
Modify | Modifies the view parameters. | |
Select | Selects the view. |
Examples
An example of using the View and ViewHandler classes:
using System; using Tekla.Structures.Model.UI; using Tekla.Structures.Geometry3d; public class ViewExample { public void ViewExample1() { View View = new View(); View.Name = "Example View"; View.ViewCoordinateSystem.AxisX = new Vector(1, 0, 0); View.ViewCoordinateSystem.AxisY = new Vector(0, 1, 0); // Work area has to be set for new views View.WorkArea.MinPoint = new Point(-3000, -3000, -3000); View.WorkArea.MaxPoint = new Point(15000, 33000, 12000); View.ViewDepthUp = 10000; View.ViewDepthDown = 2000; View.Insert(); View.WorkArea.MinPoint = new Point(-3000, -3000, -3000); View.WorkArea.MaxPoint = new Point(5000, 3000, 2000); View.Modify(); } }
using Tekla.Structures.Model.UI; public class Example { public void Example1() { ModelViewEnumerator ViewEnum = ViewHandler.GetAllViews(); while(ViewEnum.MoveNext()) { View View = ViewEnum.Current; ViewHandler.HideView(View); } } }
See Also