File tree Expand file tree Collapse file tree 2 files changed +5
-14
lines changed
content/english/java/resource-assignments Expand file tree Collapse file tree 2 files changed +5
-14
lines changed Original file line number Diff line number Diff line change @@ -35,17 +35,7 @@ In your Java file, import the required classes:
3535``` java
3636import com.aspose.tasks.* ;
3737```
38- ## Assignment Budget Management
39- Let's break down the provided example into multiple steps and explore each one in detail:
40- ``` java
41- // The path to the documents directory.
42- String dataDir = " Your Data Directory" ;
43- Project prj = new Project (dataDir + " project.mpp" );
44- for (ResourceAssignment ra : prj. getResourceAssignments()) {
45- System . out. println(ra. get(Asn . BUDGET_COST ));
46- System . out. println(ra. get(Asn . BUDGET_WORK ). toString());
47- }
48- ```
38+
4939## Step 1: Define Data Directory
5040Set the path to the directory containing your project file.
5141``` java
Original file line number Diff line number Diff line change @@ -20,13 +20,14 @@ First, import the necessary packages to work with Aspose.Tasks:
2020import com.aspose.tasks.Asn ;
2121import com.aspose.tasks.Project ;
2222import com.aspose.tasks.ResourceAssignment ;
23- // The path to the documents directory.
24- String dataDir = " Your Data Directory" ;
25- Project project = new Project (dataDir + " ResourceAssignmentVariance.mpp" );
23+
2624```
2725## Step 1: Iterate through Resource Assignments
2826To deal with variances, we need to iterate through resource assignments in the project. This is achieved using a simple loop:
2927``` java
28+ // The path to the documents directory.
29+ String dataDir = " Your Data Directory" ;
30+ Project project = new Project (dataDir + " ResourceAssignmentVariance.mpp" );
3031for (ResourceAssignment ra : project. getResourceAssignments()) {
3132 // Perform operations on each resource assignment
3233}
You can’t perform that action at this time.
0 commit comments