Managing Assignment Cost

Managing Assignment Cost

The ResourceAssignment class exposes several properties used to manage assignment cost:

To view assignment costs in Microsoft Project:

  1. On the Task Usage page, select the Insert menu and then Column.
  2. Add columns.

Resource cost columns in Microsoft Project

modify resource costs in Microsoft Project 2010

Getting Assignment Costs with Aspose.Tasks

The following example shows getting task costs using Aspose.Tasks.

 1// For complete examples and data files, please go to https://github.com/aspose-tasks/Aspose.Tasks-for-Java
 2// The path to the documents directory.
 3String dataDir = Utils.getDataDir(AssignmentCost.class);
 4
 5Project project = new Project(dataDir + "EarnedValues2010.mpp");
 6
 7for (int i = 0; i < project.getResourceAssignments().getCount(); i++) {
 8    ResourceAssignment ra = project.getResourceAssignments().getByUid(0);
 9    System.out.println(ra.get(Asn.COST));
10    System.out.println(ra.get(Asn.ACWP));
11    System.out.println(ra.get(Asn.BCWP));
12    System.out.println(ra.get(Asn.BCWS));
13}
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.