Managing Resource Costs
Contents
[
Hide
Show
]The Resource class is used to manage costs related to a resource:
- Cost represents a resource’s total project cost across all assignments (decimal).
- BCWP represents the budgeted cost of work performed by a resource (double).
- BCWS represents the budgeted cost of scheduled work (doubled).
- ACWP represents the actual cost of work performed by a resource to date (double).
- AccrueAt represents the cost accrual method used for a resource (CostAccrualType).
Working with Resource Costs
To view resource costs in Microsoft Project:
- On the Resource sheet, from the Insert menu, select Column.
- Add the columns.
Getting Resource Costs in Aspose.Tasks
The following example shows how to get task costs using Aspose.Tasks.
1Project project = new Project("New Project.mpp");
2
3// Display all resources costs
4foreach (Resource res in project.Resources)
5{
6 if (res.Get(Rsc.Name) != null)
7 {
8 Console.WriteLine(res.Get(Rsc.Cost));
9 Console.WriteLine(res.Get(Rsc.ACWP));
10 Console.WriteLine(res.Get(Rsc.BCWS));
11 Console.WriteLine(res.Get(Rsc.BCWP));
12 }
13}