PrinterItemEnumerator Class |
The PrinterItemEnumerator class allows to loop through the catalog printer items.
SystemObject
Tekla.Structures.CatalogsPrinterItemEnumerator
Tekla.Structures.CatalogsPrinterItemEnumerator
Namespace: Tekla.Structures.Catalogs
Assembly: Tekla.Structures.Catalogs (in Tekla.Structures.Catalogs.dll) Version: 2025.0.0-alpha00045580+dc02c3918546f1e94eb2d3b13ea99057fb3313e0
The PrinterItemEnumerator type exposes the following members.
| 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.
|
The following example returns true if an item with the name PDFactoryA3 has been found:
using Tekla.Structures.Catalogs; public class Example { public bool Example1() { bool Result = false; CatalogHandler CatalogHandler = new CatalogHandler(); if (CatalogHandler.GetConnectionStatus()) { PrinterItemEnumerator PrinterItemEnumerator = CatalogHandler.GetPrinterItems(); while (PrinterItemEnumerator.MoveNext()) { PrinterItem PrinterItem = PrinterItemEnumerator.Current as PrinterItem; if (PrinterItem.Name == "PDFactoryA3") { Result = true; break; } } } return Result; } }