Cross Project Predecessors

Microsoft Project lets users link tasks within the current project, or to external projects. Cross-project predecessors are predecessors from another project. Aspose.Tasks support these too.

Working with Cross-Project Predecessor Tasks

In Aspose.Tasks for Java the CrossProjectName and IsCrossProject properties exposed by the TaskLink class are used to handle cross-project predecessors.

To manage cross-project predecessor tasks in Microsoft Project from the Tools menu, select Links between Projects.

Cross-project predecessors in Microsoft Project

shows external predecessors in Microsoft Project

Getting Cross-Project Predecessor Tasks using Aspose.Tasks

Here, we shall display predecessor and successor task traversing the task links in the project.

 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(CrossProjectPredecessors.class);
 4
 5Project prj = new Project(dataDir + "project5.mpp");
 6
 7for (TaskLink tsklnk : prj.getTaskLinks()) {
 8    if (tsklnk.isCrossProject())
 9        System.out.println(tsklnk.getCrossProjectName());
10}
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.