Working with Resource Assignment Budgets
Contents
[
Hide
Show
]Managing Assignment Budget
The ResourceAssignment class exposes a number of properties for working with an assignment’s budget:
- BudgetCost represents the budgeted cost of resources assignments (decimal).
- BudgetWork represents the budgeted work of resource assignments to date.
To see assignment budgets in Microsoft Project:
- On the Task Usage page, select the Insert menu and then Column.
- Add columns.
Budget columns added in Microsoft Project
Getting Assignment Budget with Aspose.Tasks
The following example shows how to get an assignment budget 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(AssignmentBudget.class);
4
5Project prj = new Project(dataDir + "project5.mpp");
6
7for (ResourceAssignment ra : prj.getResourceAssignments()) {
8 System.out.println(ra.get(Asn.BUDGET_COST));
9 System.out.println(ra.get(Asn.BUDGET_WORK).toString());
10}