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.

Hideable Class

Accesses the information if this object is hidden or not or if it should be.
Inheritance Hierarchy
SystemObject
  Tekla.Structures.DrawingHideable

Namespace:  Tekla.Structures.Drawing
Assembly:  Tekla.Structures.Drawing (in Tekla.Structures.Drawing.dll) Version: 2018.1.0.0 (2018.1.0.0)
Syntax
[SerializableAttribute]
public class Hideable

The Hideable type exposes the following members.

Constructors
  Name Description
Public method Hideable
Initializes a new instance of the Hideable class
Top
Properties
  Name Description
Public property IsHidden
Retrieves the information if this object is hidden or not.
Top
Methods
  Name Description
Public method HideFromDrawing
Hides this object from the whole drawing. Calling Modify on the object is required to hide the object.
Public method HideFromDrawingView
Hides this object from the drawing view. Calling Modify on the object is required to hide the object.
Public method ShowInDrawing
Shows this object in the whole drawing. Calling Modify on the object is required to show the object.
Public method ShowInDrawingView
Shows this object in the drawing view. Calling Modify on the object is required to show the object.
Top
Examples
This example opens the first available drawing and hides all ModelObject's from the view.
namespace Hideable
{
    using Tekla.Structures.Drawing;

    public static class Example
    {
        public static void Example1()
        {
            DrawingHandler drawingHandler = new DrawingHandler();
            DrawingEnumerator drawingList = drawingHandler.GetDrawings();
            if(drawingList.MoveNext())
            {
                Drawing currentDrawing = drawingList.Current;
                drawingHandler.SetActiveDrawing(currentDrawing);

                DrawingObjectEnumerator objectList = currentDrawing.GetSheet().GetAllObjects(typeof(ModelObject));
                while(objectList.MoveNext())
                {
                    ModelObject currentObject = objectList.Current as ModelObject;

                    if(currentObject != null)
                    {
                        if(!currentObject.Hideable.IsHidden) // The object is not yet hidden
                        {
                            currentObject.Hideable.HideFromDrawingView();
                            currentObject.Modify();
                        }
                    }
                }
            }
        }
    }
}
See Also