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: 2024.0.0+a110b435391768740483e3032720a566518c9a63
Syntax
The ProfileItemEnumerator type exposes the following members.
Properties
Name | Description | |
---|---|---|
Current |
Returns a profile item instance of the current element.
| |
SelectInstances |
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.
|
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 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