PhaseCollection Class |
The PhaseCollection class handles the collection of the model phases.
Namespace: Tekla.Structures.Model
Assembly: Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2024.0.0+a110b435391768740483e3032720a566518c9a63
The PhaseCollection type exposes the following members.
| Name | Description | |
|---|---|---|
| Count |
Gets the number of elements contained in the ICollection.
| |
| IsSynchronized |
Gets a value indicating whether access to the ICollection is synchronized (thread safe).
| |
| SyncRoot |
Gets an object that can be used to synchronize access to the ICollection.
|
| Name | Description | |
|---|---|---|
| CopyTo | ||
| GetEnumerator |
Returns an enumerator that iterates through a collection.
|
The following example gets the phases of the model and shows the values of the PhaseName and
PhaseNumber properties in a message dialog:
using Tekla.Structures.Model; using System.Windows.Forms; public class Example { public void Example1() { Model CurrentModel = new Model(); PhaseCollection PhaseCollection = CurrentModel.GetPhases(); if (CurrentModel.GetConnectionStatus()) { foreach(Phase p in PhaseCollection) { MessageBox.Show("Name = " + p.PhaseName + ", number = " + p.PhaseNumber); } } } }