Aspose imports the wrong project from a Primavera cloud file

That was my first thought.
However, I tried importing an xer file and used PrimaveraReadOption.
I coded

var primaveraOptions = new PrimaveraReadOptions()
{
    PreserveUids = true,
    ProjectUid = 1
} ;

When I did this, it crashed. Doesn’t this mean that I only have one project saved in this xer file?

@Nour_From_XLSTAT

How does it crashed? Do you have a stack trace or error message?

I was finally able to get the ProjectUid, thanks for that!

I also noticed that with an .xer 20.12 I could import the project I had saved in Primavera, but with an .xer 21.12 I have to enter the projectUid to import the correct project. Could you please explain this difference?

@Nour_From_XLSTAT ,
it is hard to say without seeing both files.
Maybe order of projects is different in .xer 20.12 and in .xer 21.12 files and in 20.12 file the correct project is in the first position.

You can check it by opening XER file in notepad and searching for “%T PROJECT” line:

%T	PROJECT
%F	proj_id	fy_start_month_num	rsrc_self_add_flag	allow_complete_flag	rsrc_multi_assign_flag....
%R	4558	1	N	N	Y	N	
%R	4570	1	Y	Y	Y	N
%R	4571	1	Y	Y	Y	N

Hello,

Thanks to your previous answer, I understand that version 20.12 has only one project saved, which is why I’m accessing the correct project.

But is there a way to import the saved project into Primavera without checking the uid list? As in Primavera, “export_flag” indicates which project has been saved in the xer.

Alternatively, is it possible to ask directly for the project name, as you suggested with GetProjectUids, but have something like GetProjectName?

@Nour_From_XLSTAT

You can select which projects to export in Primavera and all these projects will have “export_flag” set to true in the resulting file.

We don’t have the described functionality.
I will add a ticket to our issue tracking system to extend our public API.

@Nour_From_XLSTAT
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): TASKSNET-11191

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Thanks for creating this ticket!

About the “export_flag” argument, I have several projects, but only one has an export_flag set to yes (project 512) :
image.png (2,2 Ko)

I thought this would be the only one I’d get after importing with Aspose, but I still have all the other projects too, is there an option to tweak to make it work as expected?

@Nour_From_XLSTAT ,
when you explicitly check the project in Primavera Export dialog , the export_flag is set to ‘yes’.
When several projects are selected, export_flag for each selected project is set to ‘yes’

The export_flag is set to ‘No’ when the project is not selected for export by the user, but is exported by Primavera due to external relationships with other exported projects.

Yes, I understand

I would like Aspose to automatically import the project with an export flag.

we need to investigate the issue more deeply to estimate the posibility of breaking changes (some users can rely on current logic).

@Nour_From_XLSTAT
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): TASKSNET-11192

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

@vasiliy.sinitsyn
Hi, I work with Nour, and I wanted to know how we can check the status for Issue ID(s): TASKSNET-11191 and TASKSNET-11192 ?

@apareja ,
the author of the topic can check the status in “Issues Status” section.

Example of “Issues Status” section:

1 Like

Here’s the .xer file from primavera cloud that doesn’t give us the right project (Pro38).

Pro38_original.zip (16,5 Ko)

I also tried to convert it to an mpp file using Aspose’s converter, but I get project07 instead of pro38.

1 Like

@Nour_From_XLSTAT ,
thank you for the sample file.

Converter implements the same logic and imports the first project in the input file.

I see!

I’ve found that MPXJ has the behavior I’m asking for and I hope we’re on the same page about this improvement.

By default MPXJ reads the first project it finds in the file which has been marked as the “exported” project, otherwise it will simply read the first project it finds.

https://www.mpxj.org/howto-read-xer/

Thank you

@Nour_From_XLSTAT,
I think that we can implement the similar logic.

It’s perfect, thanks in advance!

The issues you have found earlier (filed as TASKSNET-11192,TASKSNET-11191) have been fixed in this update.

Download Aspose.Tasks for .NET