Editing Task Baseline Durations

A task baseline duration represents the originally planned time required to complete a task when the baseline was saved. By comparing baseline duration with the current (or actual) duration, project managers can identify schedule variances and evaluate the accuracy of initial estimates. Using Aspose.Tasks for .NET, developers can easily read and update baseline durations programmatically without requiring Microsoft Project.

Task Baseline Duration

The following members of the TaskBaseline class are used:

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

  1. On the View menu, select More Views and ten Task Entry.
  2. From the Insert menu, select Columns.
  3. Add the Baseline Duration column.

Viewing Baseline Duration in Microsoft Project

To manually verify the baseline duration in Microsoft Project:

  1. On the View menu, select More Views, then choose Task Entry.
  2. Open the Insert menu and select Column.
  3. Add the Baseline Duration column to the view.

Getting Task Baseline Duration using Aspose.Tasks

The following code iterates over task baselines and prints their durations to the console:

 1Project project = new Project();
 2
 3// Creating TaskBaseline
 4Task task = project.RootTask.Children.Add("Task");
 5project.SetBaseline(BaselineType.Baseline);
 6
 7// Display task baseline duration
 8TaskBaseline baseline = task.Baselines.ToList()[0];
 9Console.WriteLine("Baseline duration is 1 day: {0}", baseline.Duration.ToString().Equals("1 day"));
10Console.WriteLine("BaselineStart is same as Task Start: {0}", baseline.Start.Equals(task.Get(Tsk.Start)));
11Console.WriteLine("BaselineFinish is same as Task Finish: {0}", baseline.Finish.Equals(task.Get(Tsk.Finish)));

Practical Use Cases

Conclusion

Baseline durations are a vital metric for project performance tracking. With Aspose.Tasks for .NET, you can not only extract but also update these values programmatically, making it easier to maintain accurate baselines, support variance reporting, and integrate scheduling data with other systems.

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.