Free Support Forum -

How to read work break down structure value and level in an existing MPP


I am new to Task product and need help in getting the work break down structure value and its level in an existing MPP. Can you please provide some example for this?

Thanks in advance!!

Hi Cornelius,

Thanks for writing to Aspose.Tasks support team.

You may please give a try to the following sample code which displays WBS value and level.

//Create a project reader instance
ProjectReader rdr = new ProjectReader();

//Call read method of project reader object to get project object
Project prj = rdr.Read(“d:\project5.mpp”);

// Create a ChildTasksCollector instance
ChildTasksCollector collector = new ChildTasksCollector();

// Collect all the tasks from RootTask using TaskUtils
TaskUtils.Apply(prj.RootTask, collector, 0);

// Parse through all the collected tasks
foreach (Task tsk in collector.Tasks)

ArrayList alTasks = prj.RootTask.Children;
foreach (Task tsk in alTasks)

Please feel free to write us back if you have any other query in this regard.