Outline Properties

Microsoft Project has an outline structure that lets users get a quick overview of a project. Aspose.Tasks for .NET supports this functionality and lets developers control the outline number - where the task appears in a hierarchy - and the outline level - which level of the hierarchy the task is in.

Working with Outline Properties

The Tsk class exposes the OutlineNumber and OutlineLevel properties for managing outlines associated with a class:

  1. OutlineNumber (string).
  2. OutlineLevel (integer).

Outlines in Microsoft Project

In Microsoft Project, outline number and outline level properties can be viewed on the Task Entry form by adding the columns:

  1. On the Insert menu, select columns.
  2. Add the OutlineNumber and OutlineLevel columns.

Getting Outline Properties in Aspose.Tasks

The following example shows how to get the outline level and outline number information about a task using Aspose.Tasks.

 1Project project = new Project("New Project.mpp");
 3// Create a ChildTasksCollector instance
 4ChildTasksCollector collector = new ChildTasksCollector();
 6// Collect all the tasks from RootTask using TaskUtils
 7TaskUtils.Apply(project.RootTask, collector, 0);
 9// Parse through all the collected tasks
10foreach (Task task in collector.Tasks)
12    Console.WriteLine(task.Get(Tsk.Name) + " - Outline Level : " + task.Get(Tsk.OutlineLevel));
13    Console.WriteLine(task.Get(Tsk.Name) + " - Outline Number : " + task.Get(Tsk.OutlineNumber));
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.