Extended Attributes ... duration format?

Hi,

When a task has an extended attribute , I am also getting:

<DurationFormat>3</DurationFormat>

This does not appear in the MS Project XML created by MS Project. Is there a reason?

Regards, Bruce

Hi Bruce,


The element defines how the duration will be shown in MS Project user interface. The element is optional and ignored for all cases except duration extended attributes. To prevent from exporting to XML you can set it to Undefined value. See the screen shot below.

Hi Sergey,

My question is really ... why isn't this value set to 'undefined' initially when read in or initialized in a constructor? The input source does not provide this XML in the input ... only the two minimum required items.

I do not change or set this value. I just use the new contructor for an EA and then set the field id and value.

Shouldn't the default from the read or constructor be 'undefined'?

(NOTE: this contiues to reduce the number of differences in round trips that need to be examined and explained - and only two values for the EA are really required as stated in the schema).

Regards, Bruce

Hi Bruce,


Yes, now I can see your point. If you want to specify the way the duration will appear you can set the value, otherwise the default MS Project method will be used…

I have created a new issue ‘Set DurationFormats to Undefied values when create new objects.’ with ID = 17583 and linked to this thread. We are going to resolve the issue in our July official release (we hope to launch our June release in this week).

Thank you for good idea! And sorry for inconvenience.

Hi Sergey,

Hopefully the solution in your last note will also address the Extended Attributes Definition (EAD) where the following probably should be 'Undefined' (or maybe a default value = 20 if necessary):

<ElemType>20</ElemType>
<UserDef>0</UserDef>
<AutoRollDown>0</AutoRollDown>
<RestrictValues>0</RestrictValues>
<ValuelistSortOrder>0</ValuelistSortOrder>
<AppendNewValues>0</AppendNewValues>

Regards, Bruce

Hi Sergey,

A few more that should be set to undefined ...

<ActualWorkProtected>PT0H0M0S</ActualWorkProtected>
<ActualOvertimeWorkProtected>PT0H0M0S</ActualOvertimeWorkProtected>

I don't set these and they are appearing...

Regards, Bruce

Hi Bruce,


We will try, but at first we have to check that the values are not required by any version of MS Project to read the data properly.

Maybe we can implement some mechanism to customize the project to XML export. Do you have any idea how it can work? For example, we are going to add NotesText field to Project and Resource classes, but somebody could be interested in exporting the Notes to XML in encoded RTF form as it is now, as it allows to keep the notes text formatting in MS Project 2003 and 2007(some versions).

Thank you a lot for your cooperation!

Hi Sergey,

I am struggling with the same issue ... getting 'MS Project' or any other system ... Primavera, etc to read the data properly.

So far, the items that I've been adding seem to make sense ... I've had to initialise a lot more information in the root task. Primavera needs to have the early / late .. start / finish set.. there is one more in the Resource object that needs to be set.

I'm searching for the minimum set that needs to be read ... as I'm expecting the exported version to be sufficient as long as the information is passed through correctly.

Re: Defaults...

I like the approach of 'UnDefined' as an initial state of the value. I can then set a value and see the result in the XML. This is now working ok. When I see values that have not been set by me or the input xml, mpp, it causes potential inconsistencies in the way the xml is read by other software.

Re: Customization

If there are options to the way the output is handled, then I recommend providing a boolean variable in the object model that can be enabled to make this change... These might be some examples..

XMLWrtOptTextNotes ... a boolean variable to export RTF or TEXT notes as text only

XMLWrtOptNoComment ... a boolean to suppress the Aspose.Tasks comment line (see other problem).

This way, the default = false and should be the normal XML output unless explicitly set to true.

-------------------------------------------------------------------------------------

I am also finding that some of the problems I'm having with various systems is the lack of consistently applied rules to some of the XML fields. Some of these rules may relate to simple calculations ...

For example, project start and finish ... these are at the top level XML ... they also appear to be in the roottask. Setting one should probably update the others..

Simple critical path calculations (at the task level as a start) will ensure that early / late .. start / finish have some sensible datetime values. .CalcCriticalPath.. would help. (NOTE: I'm just setting them to start / finish... just to see how far the import goes before an error.)

Alignment of duration and work values when dates change... or total of the entire work and work variance at the project level...

I'm starting to realise how much work MS Project does to keep all of the data in sync..

There are also a number of flags in the top level XML that also influence the way calculations are performed.

NOTE: I'm not looking for perfection ... I'm looking for the minimum set of XML data that enables XML to be read by various apps that claim to read MS Project XML.

Regards, Bruce

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


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