API Reference

Detailed and full API reference helps you master Tekla development

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

ViewGetClipPlanes Method

Returns all the clip planes of the view.

Namespace:  Tekla.Structures.Model.UI
Assembly:  Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2023.0.1
Syntax
public ClipPlaneCollection GetClipPlanes()

Return Value

Type: ClipPlaneCollection
The clip planes of the view.
Examples
The following example shows how all ClipPlanes are deleted from the first visible view:
using System;
using System.Collections;
using Tekla.Structures.Model.UI;
using Tekla.Structures.Geometry3d;

public class GetClipPlanesExample
{
    public void GetClipPlanesExample1()
    {
        ModelViewEnumerator ViewEnum = ViewHandler.GetVisibleViews();
        ViewEnum.MoveNext();
        View ActiveView = ViewEnum.Current;
        ClipPlaneCollection ClipPlanes = ActiveView.GetClipPlanes();
        if (ClipPlanes.Count > 0)
        {
            IEnumerator PlaneEnum = ClipPlanes.GetEnumerator();
            while (PlaneEnum.MoveNext())
            {
                ClipPlane CPlane = PlaneEnum.Current as ClipPlane;
                if (CPlane != null)
                    CPlane.Delete();
            }
        }
    }
}
See Also