Baseline Task Scheduling

Baseline Task Scheduling

The Start and Finish properties exposed by the TaskBaseLine class are used to read and write a task’s start and finish dates when the baseline was saved. Both properties support the DateTime datatype.

After saving a baseline, the task baseline schedule can be viewed in Microsoft Project:

  1. From the View menu, select More Views and then Task Entry.
  2. From the Insert menu, select Columns.
  3. Add the desired columns.

task baseline start/finish dates in Microsoft Project

Getting Task Baseline Schedule using Aspose.Tasks

The code example given below demonstrates the task baseline schedule in a console window after traversing a task’s baselines.

 1// Create project instance
 2System::SharedPtr<Project> project = System::MakeObject<Project>();
 3    
 4// Creating TaskBaseline
 5System::SharedPtr<Task> task = project->get_RootTask()->get_Children()->Add(u"Task");
 6project->SetBaseline(Aspose::Tasks::BaselineType::Baseline);
 7    
 8// Display task baseline schedule
 9System::SharedPtr<TaskBaseline> baseline = task->get_Baselines()->ToList()->idx_get(0);
10System::Console::WriteLine(u"Baseline duration is 1 day: {0}", System::ObjectExt::Box<bool>(System::ObjectExt::Equals(System::ObjectExt::ToString(baseline->get_Duration()), u"1 day")));
11System::Console::WriteLine(u"BaselineStart is same as Task Start: {0}", System::ObjectExt::Box<bool>(System::ObjectExt::Equals(baseline->get_Start(), task->Get<System::DateTime>(Tsk::Start()))));
12System::Console::WriteLine(u"BaselineFinish is same as Task Finish: {0}", System::ObjectExt::Box<bool>(System::ObjectExt::Equals(baseline->get_Finish(), task->Get<System::DateTime>(Tsk::Finish()))));
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.