Hi Jon,
I have a customer who needs to interface with Asta Powerpoint, and we've been exploring the best ways to do this. Importing .pp files using mpxj works great. I've come across some issues going the other way though, using Microsoft XML. Asta can be a bit picky, and is far from informative when it fails to import, but through trial-and-error I've indentified the following prerequisites:
I've attached potential patches to 7.7.0 which achieve the above, and we're good to go here so far. I haven't explored what implications exists for native users of the MSPDI output though, so it may be worth refactoring to allow finer control via a config option.
The most contentious patch is likely the one for Task.java. I could be wrong, but I think generateOutlineNumber() will always set the outline # to 0 for a top-level task: the Unique ID is never set at the point the method is called, and so will always be undefined (0).
Best regards,
Dave.
Thanks for the patches - just looking at them now. For the task change, I'm assuming you are providing your own unique ID. Can you revert the change you made to
Task.java, and try calling:after you've finished creating the tasks. That should correctly generate the outline number for you.
Alternatively you could turn off auto outline number generation:
if Asta doesn't need the outline number values.
Cheers, Jon, updatestructure() is exactly what I'm after. Let's forget that Task.java patch!
I've messed around with the diff a bit, but functionally this should be the same. Can you take a look at https://github.com/joniles/mpxj/pull/69 and confirm if this works for you?
The revised MSPDIWriter patch is fine, but DatatypeConverter throws an exception:
Ah - that was half an edit. I've done the other half of the edit and updated the branch. Should work as expected now!
Still get the exception. PARENT_FILE is null. If I move the
DatatypeConverter.setParentFile(m_projectFile);call northwards in the MSPDIWriter.write method, as per the attached patch, all is okay.
Last edit: Dave McKay 2018-10-23
I really need a test case which exercises this! I'll look at the patch now.
OK, that's on the branch now. I'll publish a new release of MPXJ once you're happy with the change.
Good to go now with that last patch, Jon. Thanks.
Merged into master - thanks for the patch!