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: 2024.0.0+a110b435391768740483e3032720a566518c9a63
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
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next