Gantt: Export Baseline, Manual and predecessor info to MsProject file

Hello. I need help to export baseline information, manual option by task and predecessor information by days to a msproject file.

I tried to pass baseline and manual info by tasks properties but it doesn’t work.

gantt.exportToMSProject({
tasks: {
‘Baseline’: function (task) {
return { ‘baseline_start’: task.baseline_start, ‘baseline_end’: task.baseline_end, '‘baseline_history’: task.baselineHistory }
},
‘Manual’: function (task) {
return task.unsheduled;
},
‘Custom’: function (task) {
return ‘Custom value’;
},
‘Custom 2’: ‘My Custom value’
}
});

I didn’t find in the doc how to pass predecessor lag and predecessor format in days

How can i pass those information ?
Thanks

Hello Marcio,
Right now, there is no way to export baselines as the Standard MS Project properties. You can only export them as extended attributes.
Here are examples:
http://snippet.dhtmlx.com/5/ddc5f6d24
http://snippet.dhtmlx.com/5/bca338849

The dev team will add that feature in the future, but I cannot give you any ETA.


The task objects don’t have the lag parameter, only the links have it:
https://docs.dhtmlx.com/gantt/desktop__auto_scheduling.html#settinglagandleadtimesbetweentasks
https://docs.dhtmlx.com/gantt/desktop__crud_dependency.html#editinglinkvaluesfromui

So, when the link has the lag parameter, you will see the correct value in the predecessor column in the exported file. You can check how it works by exporting the data from the following snippet:
https://snippet.dhtmlx.com/5/245b31668

Hi Ramil,
I tried to take your example and use (the exported file) to import on MSProject, but the baseline dates doesn’t appear/exist. I don’t if that is going to help, but i export an MSProject as XML and check the Baseline property for each task and they come like an Object wich contains Start and Finish properties (https://disq.us/url?url=https%3A%2F%2Fcodebeautify.org%2Falleditor%2Fy22068acd%3Ar6P435Rz3eGmsLinhPU1hbBUwSQ&cuid=1434699), different that you did on Snippet (that behavior like an Custom Field for each baseline date).

Hello Vinicius,
Please, don’t ask the same questions in different places. Let’s continue our discussion here:
https://docs.dhtmlx.com/gantt/desktop__tags.html#comment-5721162668