Creating a Task Baseline

Creating Task Baselines A task baseline can be created using the default constructor for the TaskBaseLine class as shown below.

This is demonstrated by the following Java Code

 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(CreatingATaskBaseline.class);
 4
 5Project project = new Project();
 6
 7// Creating TaskBaseline:
 8Task task = project.getRootTask().getChildren().add("Task");
 9// set baseline for specified tasks
10List<Task> myList = new ArrayList<Task>();
11project.setBaseline(BaselineType.Baseline, (Iterable<Task>) myList);
12// or set baseline for the entire project
13project.setBaseline(BaselineType.Baseline);
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.