Retrieves all the object that represent phases within the project.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 19.0.0.0 (19.0.0.405)
Syntax
Visual Basic |
---|
Public ReadOnly Property Phases As PhaseArray
Get |
Remarks
Examples
CopyC#
void Getinfo_Phase(Document doc)
{
PhaseArray phases = doc.Phases;
String prompt = null;
if (0 != phases.Size)
{
prompt = "All the phases in current document list as follow:";
foreach (Phase ii in phases)
{
prompt += "\n\t" + ii.Name;
}
}
else
{
prompt = "There are no phases in current document.";
}
TaskDialog.Show("Revit",prompt);
}
CopyVB.NET
Private Sub Getinfo_Phase(doc As Document)
Dim phases As PhaseArray = doc.Phases
Dim prompt As [String] = Nothing
If 0 <> phases.Size Then
prompt = "All the phases in current document list as follow:"
For Each ii As Phase In phases
prompt += vbLf & vbTab + ii.Name
Next
Else
prompt = "There are no phases in current document."
End If
TaskDialog.Show("Revit", prompt)
End Sub
See Also