Phase Class |
The Phase class defines a model object phase.
SystemObject
Tekla.Structures.ModelPhase
Tekla.Structures.ModelPhase
Namespace: Tekla.Structures.Model
Assembly: Tekla.Structures.Model (in Tekla.Structures.Model.dll) Version: 2025.0.0-alpha00045580+dc02c3918546f1e94eb2d3b13ea99057fb3313e0
The Phase type exposes the following members.
| Name | Description | |
|---|---|---|
| Phase |
Instantiates a new phase with the phase number 0.
| |
| Phase(Int32) |
Instantiates a new phase with the given phase number.
| |
| Phase(Int32, String, String, Int32) |
Instantiates a new phase with the given parameters.
|
| Name | Description | |
|---|---|---|
| IsCurrentPhase |
The value is 1 if the phase is the current phase, 0 otherwise.
| |
| PhaseComment |
The phase comment.
| |
| PhaseName |
The phase name.
| |
| PhaseNumber |
The phase number.
|
| Name | Description | |
|---|---|---|
| Delete | Deletes a phase. The current phase cannot be deleted. | |
| GetUserProperty(String, Double) | Retrieves a double property for the phase. | |
| GetUserProperty(String, Int32) | Retrieves an integer property for the phase. | |
| GetUserProperty(String, String) | Retrieves a string property for the phase. | |
| Insert | Creates a new phase. | |
| Modify | Modifies a phase. | |
| Select | Selects a phase. | |
| SetUserProperty(String, Double) | Sets a double property for the phase. | |
| SetUserProperty(String, Int32) | Sets an integer property for the phase. | |
| SetUserProperty(String, String) | Sets a string property for the phase. |
using Tekla.Structures.Model; using Tekla.Structures.Geometry3d; using System; public class Example { public void Example1() { Point Point1 = new Point(4000, 4000, 0); Point Point2 = new Point(7000, 4000, 0); Point Point3 = new Point(4000, 6000, 0); Point Point4 = new Point(7000, 6000, 0); Beam Beam1 = new Beam(Point1, Point2); Beam Beam2 = new Beam(Point3, Point4); Beam1.Profile.ProfileString = "HEA400"; Beam1.Finish = "PAINT"; Beam2.Profile.ProfileString = "HEA400"; Beam2.Finish = "PAINT"; Beam1.Insert(); Beam2.Insert(); Phase Beam1Phase = new Phase(); Beam1.GetPhase(out Beam1Phase); int PhaseNumber = Beam1Phase.PhaseNumber; string PhaseName = Beam1Phase.PhaseName; string PhaseComment = Beam1Phase.PhaseComment; Phase Beam2Phase = new Phase(); Beam2.GetPhase(out Beam2Phase); if(Beam1Phase.PhaseNumber != Beam2Phase.PhaseNumber) { if(Convert.ToBoolean(Beam1Phase.IsCurrentPhase)) Beam2.SetPhase(Beam1Phase); else Beam1.SetPhase(Beam2Phase); } } }