The DurationType within P6 has four options where MS project has 3. Is it possible to provide all available types? The reason is that the two P6 types that are both represented as Fixed Units have different behaviors as far as whether or not they impact the cost.
image.png (43.7 KB)
Sample P6 file:
SRR_DurationTypes.zip (5.1 KB)
Sample Code:
Project m_Project2 = new Project(@"C:\SRR_DurationTypes.xer");
ChildTasksCollector m_coll2 = new ChildTasksCollector();
TaskUtils.Apply(m_Project2.RootTask, m_coll2, 0);
string ActivityID = "A1070";
foreach (var tsk in m_coll2.Tasks) {
if (tsk.Get(Tsk.ActivityId) == ActivityID) {
Console.WriteLine($"Task ActivityID: {tsk.Get(Tsk.ActivityId)} \n" +
//$"Uid: {tsk.Get(Tsk.Uid)} \n" +
$"Name: {tsk.Get(Tsk.Name)} \n" +
$"ActivityType: {tsk.Get(Tsk.Type)} \n" +
$"Duration: {tsk.Get(Tsk.Duration)} \n" +
$"Cost: {tsk.Get(Tsk.Cost)} \n" +
$"Work: {tsk.Get(Tsk.Work)} \n");
Console.WriteLine("");
}
}