View Class

The View class contains methods related to views.
Inheritance Hierarchy
SystemObject
  Tekla.Structures.Model.UIView

Namespace:  Tekla.Structures.Model.UI
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2023.0.3
Syntax
[SerializableAttribute]
public sealed class View

The View type exposes the following members.

Constructors
  NameDescription
Public methodView
Initializes a new instance of the View class
Top
Properties
  NameDescription
Public propertyCurrentRepresentation
Gets or sets the current representation.
Public propertyDisplayCoordinateSystem
The local coordinate system for the display.
Public propertyDisplayType
The display plane type.
Public propertyIdentifier
The view identifier.
Public propertyName
The name of the view. 84 characters at most.
Public propertySharedView
The property which tells if the view is shared. The value is meaningful only when the model is shared.
Public propertyViewCoordinateSystem
The local coordinate system for the view. Can be set when creating a view. The origin is always set to zero.
Public propertyViewDepthDown
The view depth down.
Public propertyViewDepthUp
The view depth up.
Public propertyViewFilter
The name of the view filter. 256 characters at most.
Public propertyViewProjection
The view projection type.
Public propertyViewRendering
The view rendering type.
Public propertyVisibilitySettings
The property which tells the view visibility settings for objects.
Public propertyWorkArea
The view working area.
Top
Methods
  NameDescription
Public methodDelete
Deletes the view.
Public methodCode exampleGetClipPlanes
Returns all the clip planes of the view.
Public methodInsert
Inserts a new view to the model.
Public methodIsPerspectiveViewProjection
Tells whether the view projection is a perspective projection.
Public methodIsVisible
Tells whether the view is currently visible.
Public methodModify
Modifies the view parameters.
Public methodSelect
Selects the view.
Top
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
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next