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.

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: 2022.0.13611
Syntax
[SerializableAttribute]
public class Hideable

The Hideable type exposes the following members.

Constructors
  NameDescription
Public methodHideable
Initializes a new instance of the Hideable class
Top
Properties
  NameDescription
Public propertyIsHidden
Retrieves the information if this object is hidden or not.
Top
Methods
  NameDescription
Public methodHideFromDrawing
Hides this object from the whole drawing. Calling Modify on the object is required to hide the object.
Public methodHideFromDrawingView
Hides this object from the drawing view. Calling Modify on the object is required to hide the object.
Public methodShowInDrawing
Shows this object in the whole drawing. Calling Modify on the object is required to show the object.
Public methodShowInDrawingView
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