Task.GetTimephasedData

GetTimephasedData(DateTime, DateTime, TimephasedDataType)

Returns TimephasedDataCollection object with TimephasedData values within given start and end dates of specified time-phased data type.

public TimephasedDataCollection GetTimephasedData(DateTime start, DateTime end, 
    TimephasedDataType timephasedType)
ParameterTypeDescription
startDateTimeThe start date for the time phased data.
endDateTimeThe end date for the time phased data.
timephasedTypeTimephasedDataTypeThe type of time phased data (TimephasedDataType).

Return Value

A TimephasedDataCollection object with TimephasedData values within given start and end dates of specified timephased data type.

Examples

Shows how to get timephased data (with specific type) of the task.

var project = new Project(DataDir + "BaselineTD2010_3.mpp");
var task = project.RootTask.Children.GetById(1);

List<TimephasedData> data = task.GetTimephasedData(project.Get(Prj.StartDate), project.Get(Prj.FinishDate).AddDays(2), TimephasedDataType.TaskBaselineWork)
    .ToList();
foreach (var td in data)
{
    Console.WriteLine("Start: " + td.Start);
    Console.WriteLine("Finish: " + td.Finish);
    Console.WriteLine("Type: " + td.TimephasedDataType);
}

See Also


GetTimephasedData(DateTime, DateTime)

Returns TimephasedDataCollection object with TimephasedData values within given start and end dates.

public TimephasedDataCollection GetTimephasedData(DateTime start, DateTime end)
ParameterTypeDescription
startDateTimeThe start date for the time phased data.
endDateTimeThe end date for the time phased data.

Return Value

List of TimephasedData to be filled in.

Examples

Shows how to get timephased data (with TaskWork type) of the task.

var task = project.RootTask.Children.GetById(1);

List<TimephasedData> data = task.GetTimephasedData(project.Get(Prj.StartDate), project.Get(Prj.FinishDate)).ToList();
foreach (var td in data)
{
    Console.WriteLine("Start: " + td.Start);
    Console.WriteLine("Finish: " + td.Finish);
    Console.WriteLine("Type: " + td.TimephasedDataType);
}

See Also