MPXJ Version:5.1.17
Q1: If I export my p6 file to .xer . When I use MPXJ to read the file , I got garbled text in c#.(It's Chinese text originally),but if i export p6 file to XML format, i can get the right Chinese text using MPXJ in c#. Is anyone have such experience?
Q2: How can I get P6 Activity ID using MPXJ? the return type of Task.ID is Integer.. but the ID in P6 is string. When I called MPXJ, I got
ID:6 // In XML, It's "A1010" , how can I get "A1010" ?
Sample XML Fragment
<Activity>
<ActualDuration>0</ActualDuration>
<ActualFinishDate xsi:nil="true" />
<ActualLaborCost>0</ActualLaborCost>
<ActualLaborUnits>0</ActualLaborUnits>
<ActualNonLaborCost>0</ActualNonLaborCost>
<ActualNonLaborUnits>0</ActualNonLaborUnits>
<ActualStartDate xsi:nil="true" />
<ActualThisPeriodLaborCost>0</ActualThisPeriodLaborCost>
<ActualThisPeriodLaborUnits>0</ActualThisPeriodLaborUnits>
<ActualThisPeriodNonLaborCost>0</ActualThisPeriodNonLaborCost>
<ActualThisPeriodNonLaborUnits>0</ActualThisPeriodNonLaborUnits>
<AtCompletionDuration>8</AtCompletionDuration>
<AtCompletionExpenseCost>0</AtCompletionExpenseCost>
<AtCompletionLaborCost>0</AtCompletionLaborCost>
<AtCompletionLaborUnits>0</AtCompletionLaborUnits>
<AtCompletionNonLaborCost>0</AtCompletionNonLaborCost>
<AtCompletionNonLaborUnits>0</AtCompletionNonLaborUnits>
<AutoComputeActuals>0</AutoComputeActuals>
<CalendarObjectId>178</CalendarObjectId>
<DurationPercentComplete>0</DurationPercentComplete>
<DurationType>Fixed Duration and Units</DurationType>
<ExpectedFinishDate xsi:nil="true" />
<ExternalEarlyStartDate xsi:nil="true" />
<ExternalLateFinishDate xsi:nil="true" />
<Feedback />
<FinishDate>2016-01-18T16:00:00</FinishDate>
<GUID>{255EF498-16AB-5041-B86B-F6F027FB3DF0}</GUID>
<Id>A1010</Id>
<IsNewFeedback>0</IsNewFeedback>
<LevelingPriority>Normal</LevelingPriority>
<Name>使用教學語系整合</Name>
<NonLaborUnitsPercentComplete>0</NonLaborUnitsPercentComplete>
<NotesToResources />
<ObjectId>101718</ObjectId>
<PercentComplete>0</PercentComplete>
<PercentCompleteType>Duration</PercentCompleteType>
<PhysicalPercentComplete>0</PhysicalPercentComplete>
<PlannedDuration>8</PlannedDuration>
<PlannedFinishDate>2016-01-18T16:00:00</PlannedFinishDate>
<PlannedLaborCost>0</PlannedLaborCost>
<PlannedLaborUnits>0</PlannedLaborUnits>
<PlannedNonLaborCost>0</PlannedNonLaborCost>
<PlannedNonLaborUnits>0</PlannedNonLaborUnits>
<PlannedStartDate>2016-01-18T08:00:00</PlannedStartDate>
<PrimaryConstraintDate xsi:nil="true" />
<PrimaryConstraintType />
<PrimaryResourceObjectId xsi:nil="true" />
<ProjectObjectId>4508</ProjectObjectId>
<RemainingDuration>8</RemainingDuration>
<RemainingEarlyFinishDate>2016-01-18T16:00:00</RemainingEarlyFinishDate>
<RemainingEarlyStartDate>2016-01-18T08:00:00</RemainingEarlyStartDate>
<RemainingLaborCost>0</RemainingLaborCost>
<RemainingLaborUnits>0</RemainingLaborUnits>
<RemainingLateFinishDate xsi:nil="true" />
<RemainingLateStartDate xsi:nil="true" />
<RemainingNonLaborCost>0</RemainingNonLaborCost>
<RemainingNonLaborUnits>0</RemainingNonLaborUnits>
<ResumeDate xsi:nil="true" />
<ReviewStatus>OK</ReviewStatus>
<SecondaryConstraintDate xsi:nil="true" />
<SecondaryConstraintType />
<StartDate>2016-01-18T08:00:00</StartDate>
<Status>Not Started</Status>
<SuspendDate xsi:nil="true" />
<Type>Task Dependent</Type>
<UnitsPercentComplete>0</UnitsPercentComplete>
<WBSObjectId>26012</WBSObjectId>
</Activity>
See my comment above regarding reporting the bug in reading the task name. To answer you second question the Activity ID is mapped into the Text1
attribute of the task: task.getText(1)
should get you what you want.