0

I have a XER file that I imported to my trial version of Primavera P6. Here is an screen shot of one of the activity's assigned resources: enter image description here As you see I have 14 resources in Primavera but when I watch it in Visual Studio I have 13 resources: enter image description here Well I guess it has problem with duplicate assignment of same resource(I marked in the first screen shot).

Am I right? Is there any way to get all 14 resources on C# side?

msd
  • 591
  • 7
  • 23

1 Answers1

0

This is indeed your problem. The source code for Task.addResourceAssignment, which is responsible for adding resource assignments to the model, will not add multiple assignments to the same resource. Only the first such assignment will be added. Subsequent assignments will be ignored.

It would be possible to modify MPXJ to do what you want but it might be complex. Probably, there are many parts of MPXJ that fundamentally assume this is not allowed. I'm not an MPXJ expert, I just read enough of the source code to answer your question.

  • They added with Primavera P6 not with MPXJ. I'll open an issue in their git repository. Someone may fix it in the future. Thanks for the time you spent to read its source code. – msd Dec 31 '18 at 19:58
  • I use P6 at my day job and this causes issues even with Oracle's own tools at times. There is a unique ID in the taskrsrc table that can be used to disambiguate between the assignments. You might want to consider asking your customer if they really intend to do this. The price/unit on both assignments is 0 so they don't need them to manage cost. Unless the two resource assignments have different roles it may be a mistake, or something that could be solved in a different way. – Danny MacMillan Dec 31 '18 at 20:12