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.

ProfileItemEnumerator Class

The ProfileItemEnumerator class allows to loop through the catalog profile items.
Inheritance Hierarchy

Namespace:  Tekla.Structures.Catalogs
Assembly:  Tekla.Structures.Catalogs (in Tekla.Structures.Catalogs.dll) Version: 2023.0.1
public sealed class ProfileItemEnumerator : IEnumerator

The ProfileItemEnumerator type exposes the following members.

Public propertyCurrent
Returns a profile item instance of the current element.
Public propertySelectInstances
Indicates that the instance Select() is called when the 'Current' item is asked from the enumerator. The user can set this to 'false' if no members are ever asked from the instance. This is the case when, for example, asking only for the available profile names or when only certain profiles need to be selected from the model. Without the selection the 'Current' item contains the profile name or the prefix and the profile type. Warning: normally the user should not change this value.
Public methodGetSize
Returns the total amout of items.
Public methodMoveNext
Moves to the next item in the enumerator.
Public methodReset
Resets the enumerator to the beginning.
The following example returns true if a library profile item with the name HEA300 has been found:
using Tekla.Structures.Catalogs;

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

        CatalogHandler CatalogHandler = new CatalogHandler();

        if (CatalogHandler.GetConnectionStatus())
            ProfileItemEnumerator ProfileItemEnumerator = CatalogHandler.GetLibraryProfileItems();

            while (ProfileItemEnumerator.MoveNext())
                LibraryProfileItem LibraryProfileItem = ProfileItemEnumerator.Current as LibraryProfileItem;

                if (LibraryProfileItem.ProfileName == "HEA300")
                    Result = true;

        return Result;
See Also