ProfileItemEnumerator Class

The ProfileItemEnumerator class allows to loop through the catalog profile items.
Inheritance Hierarchy
SystemObject
  Tekla.Structures.CatalogsProfileItemEnumerator

Namespace:  Tekla.Structures.Catalogs
Assembly:  Tekla.Structures.Catalogs (in Tekla.Structures.Catalogs.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
[SerializableAttribute]
public sealed class ProfileItemEnumerator : IEnumerator

The ProfileItemEnumerator type exposes the following members.

Properties
  NameDescription
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.
Top
Methods
  NameDescription
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.
Top
Examples
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;
                    break;
                }
            }
        }

        return Result;
    }
}
See Also
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next