Calculating Percentages

Tracking progress in project management often requires knowing how much of an assignment has been completed. Aspose.Tasks for .NET provides the PercentWorkComplete property, which allows you to retrieve or manage this information programmatically, without opening Microsoft Project.

The Asn class exposes the following key property:

This value helps project managers monitor progress, generate reports, and ensure timely project delivery.

Getting Percentages in Aspose.Tasks

In the following example, we demonstrate how to access the PercentWorkComplete property for a resource assignment. This code retrieves the percentage of completed work directly from the project file.

1Project project = new Project("New Project.mpp");
2
3// Print assignment percent completion
4foreach (ResourceAssignment ra in project.ResourceAssignments)
5{
6    Console.WriteLine(ra.Get(Asn.PercentWorkComplete).ToString()); 
7}

FAQ

Q: Do I need Microsoft Project installed to calculate PercentWorkComplete?

Q: Can I update the PercentWorkComplete value using Aspose.Tasks?

Q: Does PercentWorkComplete affect other task or assignment fields?

Conclusion

The PercentWorkComplete property in Aspose.Tasks for .NET makes it simple to monitor and control assignment progress. By retrieving or updating this value programmatically, you can automate reporting, enforce accurate tracking, and maintain project timelines. This feature eliminates the need for Microsoft Project, giving developers full control over project data directly in C#.

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.