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.

ShapeItemEnumerator Class

The ShapeItemEnumerator class allows to loop through the shape catalog items.
Inheritance Hierarchy

Namespace:  Tekla.Structures.Catalogs
Assembly:  Tekla.Structures.Catalogs (in Tekla.Structures.Catalogs.dll) Version: 2020.0.0.0 (2020.0.55582.0)
public sealed class ShapeItemEnumerator : IEnumerator

The ShapeItemEnumerator type exposes the following members.

  Name Description
Public property Current
Returns a shape item instance of the current element.
  Name Description
Public method GetSize
Returns the total amount of items.
Public method MoveNext
Moves to the next item in the enumerator.
Public method Reset
Resets the enumerator to the beginning.
The following example returns true if an item with the name Connection has been found:
using Tekla.Structures.Catalogs;

public class Example
       public bool Example1()
           bool Result = false;

           CatalogHandler CatalogHandler = new CatalogHandler();

           if (CatalogHandler.GetConnectionStatus())
               ShapeItemEnumerator ShapeItemEnumerator = CatalogHandler.GetShapes();

               while (ShapeItemEnumerator.MoveNext())
                   ShapeItem ShapeItem = ShapeItemEnumerator.Current as ShapeItem;

                   if (ShapeItem.Name == "Connection")
                       Result = true;

           return Result;
See Also