Working with Outline Properties

In Microsoft Project, the outline structure provides a hierarchical view of tasks, helping users organize and navigate large projects. Aspose.Tasks for .NET lets developers programmatically access and manage these outline properties, ensuring consistency when reading or writing Microsoft Project files.

Understanding Outline Properties

Tasks in Microsoft Project have two key outline-related fields:

These properties are accessible via the Tsk class.

Checking in Microsoft Project

To view outline properties in Microsoft Project:

  1. Go to the Insert menu and select Column.
  2. Add the Outline Number and Outline Level fields.
  3. The project will display hierarchical identifiers (e.g., 1, 1.1, 1.1.1) and task levels.

Example: Reading Task Outline Properties

The following C# example demonstrates how to retrieve the OutlineNumber and OutlineLevel of tasks using Aspose.Tasks for .NET:

 1Project project = new Project("New Project.mpp");
 2
 3// Create a ChildTasksCollector instance
 4ChildTasksCollector collector = new ChildTasksCollector();
 5
 6// Collect all the tasks from RootTask using TaskUtils
 7TaskUtils.Apply(project.RootTask, collector, 0);
 8
 9// Parse through all the collected tasks
10foreach (Task task in collector.Tasks)
11{
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));
14}

Key Notes

FAQ

Q: Can I set outline properties when creating tasks with Aspose.Tasks?

Q: Do outline properties affect scheduling?

Q: Are outline properties supported in both MPP and XML formats?

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.