MaterialMarketSizesItemEnumerator Class |
The MaterialMarketSizesItemEnumerator class allows to loop through the items defined in XS_PROFDB\marketsizes.dat file.
Inheritance Hierarchy
Namespace: Tekla.Structures.Catalogs
Assembly: Tekla.Structures.Catalogs (in Tekla.Structures.Catalogs.dll) Version: 2023.0.3
Syntax
The MaterialMarketSizesItemEnumerator type exposes the following members.
Properties
Methods
Name | Description | |
---|---|---|
MoveNext |
Moves to the next item in the MaterialMarketSizesItemEnumerator.
| |
Reset |
Resets the MaterialMarketSizesItemEnumerator to the beginning.
|
Examples
The following example returns true if an item with the name S235JR has been found and
there is at least one market size for the item:
using Tekla.Structures.Catalogs; public class Example { public bool Example1() { bool result = false; CatalogHandler catalogHandler = new CatalogHandler(); if (catalogHandler.GetConnectionStatus()) { try { MaterialMarketSizesItemEnumerator marketSizesEnumerator = catalogHandler.GetMaterialMarketSizes(); while (marketSizesEnumerator.MoveNext()) { MaterialMarketSizesItem materialSpecificMarketSizes = marketSizesEnumerator.Current as MaterialMarketSizesItem; if (materialSpecificMarketSizes != null) { if (materialSpecificMarketSizes.MaterialName == "S235JR") { if (materialSpecificMarketSizes.MarketSizes != null) { if (materialSpecificMarketSizes.MarketSizes.Length > 0) { result = true; break; } } } } } } catch(CatalogItemEnumeratorInitializationException e) { // Handle the exception here and see the inner exception for more details. } } return result; } }
See Also