Retrieves all the object that represent phases within the project.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Remarks
The phases returned are in order of earliest phase first, through to latest phase last.
Examples

void Getinfo_Phase(Document doc)
{
// Get the phase array which contains all the phases.
PhaseArray phases = doc.Phases;
// Format the prompt string which identifies all supported phases in the current document.
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.";
}
// Give the user the information.
TaskDialog.Show("Revit",prompt);
}

Private Sub Getinfo_Phase(doc As Document)
' Get the phase array which contains all the phases.
Dim phases As PhaseArray = doc.Phases
' Format the prompt string which identifies all supported phases in the current document.
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
' Give the user the information.
TaskDialog.Show("Revit", prompt)
End Sub