Percentage Complete Calculations
In Microsoft Project, percentage complete values help track project progress by showing how much of a task has been finished. Aspose.Tasks for .NET allows developers to read and manage these percentage fields programmatically, ensuring accurate reporting and integration with custom project management workflows.
Percentages
The Tsk class provides several properties to measure task progress:
PercentComplete Type: Integer Purpose: Represents the percentage of a task’s duration that has been completed.
PercentWorkComplete Type: Integer Purpose: Represents the percentage of a task’s work effort that has been completed.
PhysicalPercentComplete Type: Integer Purpose: Represents the percentage entered manually by a project manager, often used for earned value analysis.
To see the physical percent complete in Microsoft Project:
- On the Task Entry form, from the Insert menu, select Column.
- Add the column.
To see the completed percentage in Microsoft Project one can double-click the desired column in the Task Entry form.
Getting Percentages in Aspose.Tasks
The following C# example demonstrates how to read task percentage completion values:
1Project project = new Project("TaskPercentageCompletion.mpp");
2
3// Access tasks and display percentage completion
4foreach (Task task in project.RootTask.Children)
5{
6 Console.WriteLine(task.Get(Tsk.PercentComplete));
7 Console.WriteLine(task.Get(Tsk.PercentWorkComplete).ToString());
8 Console.WriteLine(task.Get(Tsk.PhysicalPercentComplete).ToString());
9}
Key Notes
- PercentComplete is based on duration (time).
- PercentWorkComplete is based on effort (work hours).
- PhysicalPercentComplete is independent and entered manually, making it more flexible for project managers.
- These fields are critical for progress tracking, earned value management, and reporting.
FAQ
Q: What is the difference between PercentComplete and PercentWorkComplete?
- PercentComplete measures progress in terms of time, while PercentWorkComplete measures progress in terms of work effort.
Q: When should I use PhysicalPercentComplete?
- Use it when the project manager wants to manually control progress reporting, especially in earned value analysis.
Q: Are percentage fields preserved across MPP and XML formats?
- Yes. Aspose.Tasks ensures consistent handling of these values across supported Microsoft Project formats.