Managing Assignment Cost
Contents
[
Hide
Show
]Managing Assignment Cost
The ResourceAssignment class exposes several properties used to manage assignment cost:
- Cost represents an assignment’s total project cost (decimal).
- BCWP represents the budgeted cost of work to date on an assignment (double).
- BCWS represents the budgeted cost of work scheduled for an assignment (double).
- ACWP represents the actual cost of the work carried out on an assignment to date (double).
To view assignment costs in Microsoft Project:
- On the Task Usage page, select the Insert menu and then Column.
- Add the columns.
Getting Assignment Costs with Aspose.Tasks
The following example shows getting task costs using Aspose.Tasks.
1Project project = new Project("New Project.mpp");
2
3// Print resource assignment costs
4foreach (ResourceAssignment ra in project.ResourceAssignments)
5{
6 Console.WriteLine(ra.Get(Asn.Cost));
7 Console.WriteLine(ra.Get(Asn.ACWP));
8 Console.WriteLine(ra.Get(Asn.BCWP));
9 Console.WriteLine(ra.Get(Asn.BCWS));
10}