Calendar UIDs

Hi,

I am now creating 'Resource Calendars' using the NextCalendarUID. The current Standard calendar has UID = 1. The NextCalendarUID = 2 (as expected) for a resource calendar.

I have a question about Calendar UID numbering and Base Calendars.

MS Project typically shows 3 base calendars: Standard, 24 Hours, and Night Shift. I only see the Standard in the saved XML from MS Project. However, I do see a gap in numbering 'resource calendars' when I save XML from MS Project - the first one starts at 3 (which would allow 0,1,2).

Does MS Project have any pre-allocated UIDs for base calendars? I'm using 2002 - could you check with 2007? I would like to ensure that I do not use any pre-allocated calendar UIDs (if they exist).

Regards, Bruce

Hi Bruce,


The first custom calendar I have added to project in MS Office Project 2007 was added with Uid = 3. So I have two Calendars - Standart with Uid = 1 and custom with Uid = 3. And again in MS Office Project 2007 we have the three base calendars.

Good news: I have added your template newMSProject2003.xml in our test engine, 10 tasks and 10 resources were added by code. The project was open correctly in MS Office Project 2003/2007/2010.
MS Office Project 2010 is now available as BETA version.

Hi,

Thanks for testing this...

Does this mean that the first UID allocated by NextCalendarUID = 3 rather than the current calculated value?

The first UID I received from NextCalendarUID was 2 during my testing.

So it seems that the first / minimum UID to be allocated by the NextCalendarUID = 3 to account for the 3 base calendars that might be used.

Does this mean a change to the algorithm?

BTW: Many thanks for the confirmation on Project 2010

Regards, Bruce

Hi Bruce,


The NextCalendarUid returns 2 because the maximum of Calendar’s Uids in the xml is 1. The implemented algorithm is the same for all Uids now.

To avoid using reserved Uids you can make one extra call of NextCalendarUid if it’s value equals 2. I will consider to put it inside the NextCalendarUid algorithm.

Hi,

Excellent ... I prefer the minimum to be built into NextCalendarUID.

(I have made a temporary fix to the app to continue testing).

Regards, Bruce

Hi Bruce,


the issue ‘Investigate MS Project Calendars Uids generation and update NextCalendarUid respectively’ with issue id 12787 was created on our issue tracking system. You will get an automatic message as the issue will be resolved.

Hi,

Many thanks!! If you happen to make any other interim updates, I'll be glad to test them.

Regards, Bruce

Hi Bruce,


I have made my MS Project Calendar Uids behaviour investigation. Yes, the first Calendar I have added gets Uid = 3 while standart project Calendar has Uid = 1, but it looks that Uid = 0 and 2 are not reserved for ‘24 hours’ and ‘Night shift’ calendars as when I have added them they were added with next Uid (next from 3). So I am going to change the NextCalendarUid by the way:

If there are no calendars at all it starts from 1.
Else if there is only one calendar with Uid = 1 it starts from 3.
Else it starts from max of calendar uids + 1.

But be aware that ‘24 hours’ or ‘Night shift’ calendars will be added by MS Project with next Uids and not fixed ones like 0 or 2 as it was expected.

Else, I am going to start NextResourceAssignmentUid from 1 (not from 0 as now) as it is in MS Project.

Let me know, if it works for you.

Hi,

Excellent Analysis!!!!! Typical Microsoft Consistency!! :-)

Regards, Bruce

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


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

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.