Bob Bob - 1 year ago 145
C# Question

Determining MS Project Task Lineage

I have a MS Project file which I am using the Primary Interop Assemblies to parse. How can I determine the lineage of a task? I was relying on the WBS code, however the client has started to fiddle with this field and it no longer represents the hierarchy of the data.

Edit: By lineage I mean a way to identify where in the hierarchy the task exists. By default the WBS code mimics this perfectly.

I need this information to determine what is the parent for a task.


  • A

  • B

    • B1

    • B2

    • B3

  • C

The Lineage for B3 would be 2.3 (If we counted by 1, like project)

Answer Source

Try the Task object's OutlineNumber property and the PredecessorTasks collection.


Colby Africa

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download