Problem with Duration Type from P6

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("");
            }
        }

@leglandpalisade,

could you check
tsk.PrimaveraProperties.RawDurationType?
It contains Primavera-specific duration type.
The drawback is that fact that it string-typed and contains “raw” (non-user friendly) values from the original XER or P6XML file, but we plan to add enum-typed PrimaveraProperties.DurationType in version 23.3.

Thank you for the quick reply!

The tsk.PrimaveraProperties.RawDurationType attribute does provide information that I can use. Then once 23.3 is released we can switch to the new enum.

@vasiliy.sinitsyn
I found this was reported by a previous member of our team. Has this been completed?

@Nour_From_XLSTAT is now in charge of out product using Aspose.Tasks

@apareja

Yes, the property Task.PrimaveraProperties.DurationType can be used to get task’s Primavera-specific duration type.