Renumber WBS Codes with Aspose.Tasks for Java 18.3

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn

We are pleased to announce the release of Aspose.Tasks for Java 18.3. This release brings enhancements to API functionality by introducing new features. Specifically, it provides support for renumbering WBS Codes of tasks in a project and eliminate gaps between tasks list and page footer while rendering project data. For a detailed note on what is new and fixed, please visit the Release Notes page of API documentation.

Renumbering WBS Codes with Aspose.Tasks for Java 18.3

This release of Aspose.Tasks for Java lets you renumber the WBS codes associated with tasks like Microsoft Project’s “Renumber” function. You can renumber all or selected WBS codes of tasks in a project as shown in the following sample code.

Project project = new Project(dataDir + "RenumberExample.mpp");

List tasks = (List) project.getRootTask().selectAllChildTasks();

System.out.println("WBS codes before: ");

// output: ""; "1"; "2"; "4"
for (Task task: tasks)
{
	System.out.println("\"" + task.get(Tsk.WBS) + "\"" + "; ");
}

// project.RenumberWBSCode(); // this overload could have used too
List listIds = new ArrayList<>();
listIds.add(1);
listIds.add(2);
listIds.add(3);
project.renumberWBSCode(listIds);

System.out.println("\nWBS codes after: ");

// output: ""; "1"; "2"; "3"
for (Task task: tasks)
{
	System.out.println("\"" + task.get(Tsk.WBS) + "\"" + "; ");
}

Eliminating Gaps between Tasks List and Page Footer

The rendering capabilities of project data to various formats is one of the powerful features of Aspose.Tasks for Java API.  We have further improved this functionality by providing the feature of reducing gap between project’s tasks list and footer information in output. This improves the visualization of project’s rendered information in the output. The setReduceFooterGap property of SaveOptions class can be used to achieve this as shown in the following code sample.

//Read the MPP file.
Project project = new Project(dataDir + "Homemoveplan.mpp");

//Use ReduceFooterGap property to reduce the gap between list of tasks and Footer
ImageSaveOptions imageSaveOptions =  new ImageSaveOptions(SaveFileFormat.PNG);
imageSaveOptions.setReduceFooterGap(true);
imageSaveOptions.setSaveToSeparateFiles(true);
imageSaveOptions.setPageSize(PageSize.A0);
imageSaveOptions.setTimescale(Timescale.Days);
project.save(dataDir + "ReducingGapBetweenTasksListAndFooter_out.png", (SaveOptions)imageSaveOptions);

Get Page Count for Specific Dates

This release also introduces an enhancement for getting number of pages based on specified Start and End dates. This feature can be used to get specific page count for specified dates even during conversion to various output formats.

API Resources

  • Product Documentation – Provides complete information about system requirements, installation, Programmer’s Guide, Technical articles and API Changes
  • API Reference Guide – Provides information about the product namespaces, classes and methods
  • GitHub Examples – Ready to download and execute examples of the API
  • Forum Support – Post your queries/inquiries on Aspose.Tasks forum to get support from our technical support team.

To keep up with our news, you can follow us on Twitter or follow our Facebook page.