![]() | ShapeItemEnumerator Class |
The ShapeItemEnumerator class allows to loop through the shape catalog items.

Namespace: Tekla.Structures.Catalogs
Assembly: Tekla.Structures.Catalogs (in Tekla.Structures.Catalogs.dll) Version: 2023.0.1

The ShapeItemEnumerator type exposes the following members.


Name | Description | |
---|---|---|
![]() | GetSize |
Returns the total amount of items.
|
![]() | MoveNext |
Moves to the next item in the enumerator.
|
![]() | 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; break; } } } return Result; } }
