I’ve used your test PBP file: RATimephasedData2010.PBP
Open the PBP
Export to a new file with all buttons clicked and use dates (see: RATimephasedData2010_exportoriginal.XML)
Import to the PBP file (notice that the comparison is update (e.g. find a match for each task or resource)
Compare these files both output by aspose.tasks … no changes but the creation date.
This is a test I call a round trip… export, import and see if anything changes. Only new tasks should be added to the file … any XML data that has change will be imported.
I performed the same test as above and then converted the two files to XML and then did a compare.
The mpp files are missing the Extended Attributes in the tasks … this causes the tasks to be deleted and added again to the file. This may cause the timephased data to be mixed up. (same for resources).
The root problem that needs to be fixed is the missing TEXT30 fields for the tasks and resources in the MPP file and then at least the round trip will work and then the time phased data can be tested.
Summary: Extended Attributes missing in Tasks (and possibly resources) in MPP file.
This is the problem I was looking for.
I’ve attached the two sets of data. Do you need a new EXE file?
Here are some simple steps to create a file w/o Extended Attributes in the MPP file:
Hold the shift key
Select: Tools >> MS Project Interface
Push the button: Select MPP File
Enter a new file name: RATimephasedData2010_003.MPP
(increment the number before the .mpp)
NOTE: If you select the ‘save as file type’ to XML, you can create the XML files I have provided with TEXT30.
Select TAB 2 (2. Select Options): Click all of the task buttons and select ‘use dates’.
Select TAB 3 (3. Import or Export)
Push the button: Identify Changes (confirm Action = Add)
Push the button: Apply Changes
Open MS Project
On the Entry table: Right click and Insert Column TEXT30
NOTE: The TEXT30 column is empty (no values showing).
Close / exit MS Project and do not save to the file (leave it as aspose.tasks created it).
Select the first tab 1 (1. Select Files)
Push the button: Select MPP Files…
Keep the same file name: RATimephasedData2010_003.MPP
Select save as file type: XML
the file name will change to: RATimephasedData2010_003.XML
Do not change any options (2. Select Options)
Select TAB 3 (3. Import / Export)
Push the button: Identify Changes (confirm actions = ADD)
Push the button: Apply Changes
Open MS Project with the new file
On the Entry Table: right click and insert a column = TEXT30
Observe that the TEXT30 column now has valid IDs for the task row:
These are not readable in the MPP file.
Close MS Project (do not save the file).
Close the MS Project Interface window (do not save the file).
Without these fields, ChangeAide cannot match the tasks it reads. Normally there will be alignment and any changes in import or export will be updated.
NOTE: ChangeAide is a way to create MS Project files in a structured way (using Product Based Planning). Normally, ChangeAide is used first and then a file is exported to MS Project. Once the plan is ok in MS Project, imports will generally be used to keep ChangeAide up to date with the dates and structure of a plan. When performing an import … ChangeAide will pass through all information from the MPP, there are only a few fields that will be updated. This should not influence any information passed through.
You should not need an updated version as long as you use the latest DLL you provided. I’ve added the files I just created as an attachment.
Hope this helps…
1) A simple way to tell which version I used. Create or Open an XML file and look at the aspose.tasks version added to the file. you will see that the sample I created was 22.214.171.124.
2) I only have support for MS Project 2007 as this was the only MPP version that worked a while ago. Can you confirm which MPP versions you support and I’ll make a new version with all MPP versions supported when I get another updated DLL.
I’ll continue testing when I get the next DLL. I have a number of tests ready to go.
Private Function Task_EA(ByRef rtskToCheck As Aspose.Tasks.Task, ByVal vlngField As Aspose.Tasks.ExtendedAttributeTask, ByVal vblnSet As Boolean, ByVal vstrValue As String) As Object
'get the value of an EA for a task
Dim peadToGet As Aspose.Tasks.ExtendedAttributeDefinition
Dim peaFound As Aspose.Tasks.ExtendedAttribute = Nothing
Dim val As Value
Task_EA = Nothing
peadToGet = EAD_Check(Aspose.Tasks.ElementType.Task, vlngField, Aspose.Tasks.ExtendedAttributeResource.Text30)
If peadToGet IsNot Nothing Then
'have an ead for the EA… now can set an ea
peaFound = EA_Get(peadToGet, CObj(rtskToCheck), vblnSet)
'now set or get the value if an ea is available
If peaFound IsNot Nothing Then
'have an ea to use
If vblnSet = True Then
'set the attribute value
peaFound.Value = vstrValue
'this value needs to be added to ead value list to be shown in the MSP ea column
val = New Value()
val.Val = vstrValue
val.Id = peadToGet.ValueList.Count + 1
'have an ea for an ead… use this ea
Task_EA = peaFound.Value
Catch ex As Exception
I’ve added the extra code and cannot see the field values.
Is this code specifically required for MPPs? it does not seem to be required for the XML.
Many thanks! I confirm that I get the extended attributes when running the sample you provided.
I will now attempt to understand why my code does not work for the MPP and does work for the XML.
Here are the results of my tests…
To set the Extended Attributes, I needed to set the EAD in the EA or
EA.AttributeDefinition = EAD
To read the Extended Attributes, I needed to not use the following:
It does not look like ElementType is saved in the MPP.
For the XML version, it looks like EAD.ElementType does work and AttributeDefinition is not needed.
I will continue testing once I get the next version of the DLL.