Re: 11600 ... and Resource UID = 0 (ignore or use?)

Hi,

A few more points, my application always reads a file (either a new or existing file). so I always will have both project and resource with UID = 0. I must ensure that only the changes I make are passed through to a saved version. Maybe Project.Check could check for Task and Resource with UID = 0 too. (whatever it checks?).

I believe that 'merging' projects is actually quite complicated ... the tasks or resources being merged need to have new unique id ... and the base project should probably retain their own unique ID.

So, your suggestion to have a starting UID for the CalResourceUID or CalcTaskUID sounds good as the starting number may not always be 1 - it may be NextTaskUID or NextResourceUID.

Assignments will also need to have their uniqueIDs changed too. So you may also need NextResourceAssignmentUID and a start parameter for CalcResourceAssignmentUIDs.

I don't know your cycle for including these capabilities. These are fairly fundamental so (painfully) I'll delay the beta testing of my app until these features are available. I'll be glad to test any early versions.

Regards, Bruce

Hi,

Excellent!!! Could you please add NextResourceAssignmentUID to the list on issue id = 12520 as this is just as critical.

Regards, Bruce

Hi Bruce,


Updated, now the issue name is ‘Support NextTaskUID, NextResourceUID and NextResourceAssignmentUID methods.’

Hi,

Any idea when these methods will be available? I'll gladly test any versions (pre-release too) you have!!

Regards, Bruce

Hi Bruce,


I will try to make some intermadiate build ASAP, now I have to fix changes I am in the middle. I will create a versions as I can get a working build with the some new features.

Hi Bruce,


The intermediate version of Aspose.Tasks is created.

Next enhancements were added:
1. Support of NextTaskUid, NextResourceUid, NextResourceAssignmentUid, NextCalendarUid.
2. Outline codes reading support from MS Office Project 2003 mpp files.
3. Task Baselines reading support from MS Office Project 2003 mpp files.

The version is intermediate and not all testing has been completed yet.

NextTaskUids starts from 0 for project with no tasks, for looaded from file projects it maximum of all tasks’ Uids + 1. The value increments each call.
NextResourceUid, NextResourceAssignmentUid and NextCalendarUid impement the same algorithm but for resources, assignments and calendars correspondingly.

Hi,

I really appreciate this update. The algorithms sound fine. I'm glad to see you also included the CalendarUIDs too. I will test these today.

Regards, Bruce

Hi,

Results from initial testing. (using with VS 2005 and .NET Framework 2.0)

Task UIDs look ok and Task UID = 0 looks ok.

Resource with UID = 0 from the XML loaded was not included and the first resource became the Resource with UID = 0. so I'm now missing a resource from the resource sheet. The algorithm for calculating UIDs seems to be working ok. I've attached the xml generated.

This is similar to the initial problem I reported (e.g. getting a blank resource at UID = 1). The resource being loaded from the XML file does not seem to be recognised as the Resource with UID = 0. (or may be overwritten).

As I suggested before, maybe a RootResource property (the resource with UID = 0) will help ensure that there is a resource with UID = 0 uncoupled from any other methods.

Regards, Bruce

Hi,

In addition, I have just noticed that the first resourceassignment UID = 0 rather than 1 as before. My understanding is that the CalcResourceAssignmentUIDs starts with 1. Should they be the same?

Regards, Bruce

Hi Bruce,


I have returned the Calc functions to their old state, partly, because of your problems, you can find their parametrized analogs, like, CalcResourceUid(int start) - numeration starts from start number (I think only 0 and 1 can be used, but may be somebody will need others).

Hope, it will work for all. The final decision will be made before next official release.

Be aware, you have to add the resource with Uid = 0 by hand if you have any or it will be added automatically during export to xml. The resource is required despite the MS Project never shows it.

Hi,

I did not get your response about the missing Resource with UID = 0.

The input XML file (newMSPProject.xml for 2003) you provided was used to create the recent output file. The output file did not include the original Resource with UID = 0. If the XML read operation did see the resource with uid = 0 then the first UID should be UID = 1. What has happened to the Resource with UID = 0 contained in the input file? This should be passed through and not dropped and then added later.

Given the new methods you provide, I do not use any of the Calc methods for UIDs.

Can you check that a file that contains a Resource with UID = 0 is preserved when read!! Please check this using the XML file (newMSPProject.xml for 2003) you provided as the new XML input file. This should provide a task with uid = 0 and a resource with uid = 0 - both should be preserved in the output file without any operations.

Regards, Bruce

Hi,

I just want to be absolutely clear:

"Be aware, you have to add the resource with Uid = 0 by hand if you have any or it will be added automatically during export to xml. The resource is required despite the MS Project never shows it."
The input file had a resource with UID = 0 which should have been retained on Read. I should not need to add one. Please confirm that resources with UID = 0 are being read and retained correctly.
Regards, Bruce

Hi Bruce,


Not any tasks, calendars, resource assignments could be added/deleted while writing/reading operations.

The resource with UID=0 could be added while exporting your data into xml ONLY if you have some resources in the project and not any of them with UID=0. So, if you not change the resource UID (the root resource you have) or delete it, not any additional resources will be added.

Hi,

Thanks for continuing to help me get this area working. As I was building a sample, I found one more place where I used CalcResourceUIDs. When I removed this, all resources appeared in their correct order with the original resource with UID = 0 retained.

I left the CalcResourceIDs in prior to save. The IDs in the resource sheet appear to start from 1 however, the first resource (UID = 1) in the XML appears to have an ID of 0. How are the IDs calculated?

Thanks again for your help!

Regards, Bruce

Hi Bruce,


The enumeration is started from 0.

CalcResourceIds starts the numeration from 0 up to resources’ collection length - 1. The same way as CalResourceUids now.

We can consider to add Next…Ids methods and Calc…Ids(int start) for tasks, resources, calendars and assignments like the methods for Uids I have added, if clients find this helpfull.

Hi,

The support for UIDs is now fine. I really appreciate the Next...UID methods.

My understanding of the IDs is that sequential numbering of IDs is fine. I was only concerned about whether the ID numbers start at 1 rather than 0 (leaving the UID = 0 with ID = 0) I don't believe these need a Next...ID method.

I'm moving on to other areas ... I'll now start adding resource calendars, sorting, adding and deleting resources, tasks, and resourceassignments.

Thanks again for your help.

Regards, Bruce

The issues you have found earlier (filed as 12520) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi,

Many thanks for the update!!! I appreciate the work that has gone into this over the past few months!!

Happy New Year!!

Regards, Bruce

Hi Bruce,

Happy New Year.

We always try to be useful, quick responsive and productive for our customers as it is our policy. If you find our Aspose.Tasks for .NET component and our support to solve your problems valuable to you, you can add testimonial from your side here.

Hi Bruce!


Happy New Year!

Thank you for your interest in our products. Have a nice and fruitfull New Year 2010!