Tekla Open API

Detailed and full API reference helps you master Tekla Open API

This is the most recent version of Tekla Open API.
For older versions, please visit Tekla Warehouse.

ViewHandler Class

The ViewHandler class contains methods for handling views.
Inheritance Hierarchy
SystemObject
  Tekla.Structures.Model.UIViewHandler

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

The ViewHandler type exposes the following members.

Constructors
  Name Description
Public method ViewHandler
Initializes a new instance of the ViewHandler class
Top
Methods
  Name Description
Public methodStatic member GetAllViews
Fetches all the views from the model.
Public methodStatic member GetPermanentViews
Returns the permanent views.
Public methodStatic member GetSelectedViews
Returns the views the user has selected.
Public methodStatic member GetTemporaryViews
Returns the temporary views.
Public methodStatic member GetVisibleViews
Returns the visible views.
Public methodStatic member HideView
Closes a model view.
Public methodStatic member RedrawView
Redraws a model view.
Public methodStatic member RedrawWorkplane
Sets the workplane to current transformation plane and redraws it.
Public methodStatic member SetRepresentation
Sets the object representation.
Public methodStatic member ShowView
Opens a model view.
Public methodStatic memberCode example ZoomToBoundingBox(AABB)
Zooms the current model view.
Public methodStatic member ZoomToBoundingBox(View, AABB)
Zooms a model view.
Top
Examples
using Tekla.Structures.Model.UI;

public class Example
{
       public void Example1()
       {
           ViewHandler.SetRepresentation("standard");
           ModelViewEnumerator ViewEnum = ViewHandler.GetAllViews();

           while (ViewEnum.MoveNext())
           {
               View ViewSel = ViewEnum.Current;
               ViewHandler.ShowView(ViewSel);
               ViewHandler.RedrawView(ViewSel);
               ViewHandler.HideView(ViewSel);
           }
       }
}
See Also