MaterialItemEnumerator Class |
The MaterialItemEnumerator class allows to loop through the catalog material items.
Inheritance Hierarchy
Namespace: Tekla.Structures.Catalogs
Assembly: Tekla.Structures.Catalogs (in Tekla.Structures.Catalogs.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
The MaterialItemEnumerator type exposes the following members.
Properties
Methods
Name | Description | |
---|---|---|
GetSize |
Returns the total amout of items.
| |
MoveNext |
Moves to the next item in the enumerator.
| |
Reset |
Resets the enumerator to the beginning.
|
Examples
The following example returns true if an item with the name S235JR has been found:
using Tekla.Structures.Catalogs; public class Example { public bool Example1() { bool Result = false; CatalogHandler CatalogHandler = new CatalogHandler(); if (CatalogHandler.GetConnectionStatus()) { MaterialItemEnumerator MaterialItemEnumerator = CatalogHandler.GetMaterialItems(); while (MaterialItemEnumerator.MoveNext()) { MaterialItem MaterialItem = MaterialItemEnumerator.Current as MaterialItem; if (MaterialItem.MaterialName == "S235JR") { Result = true; break; } } } return Result; } }
See Also