Export to MSProject

Hello,
How can i export the Manual value for each Task? According to MSProject exportation, that property says if the task is Auto Scheduled or not. I could change de Manual value according to Project Auto Schedule flag, but it’s not specified for each task, it’s global.
[https://codebeautify.org/alleditor/y22068acd](http://XML Task)

Another question, is how to set custom LagFormat value on PredecessorLink Object, inside of Task object.

Hello Vinicius,

How can i export the Manual value for each Task? According to MSProject exportation, that property says if the task is Auto Scheduled or not. I could change de Manual value according to Project Auto Schedule flag, but it’s not specified for each task, it’s global.

By default, all tasks are auto-scheduled if you enabled the gantt.config.auto_scheduling parameter. But you can cancel auto-scheduling for the tasks by adding the auto_scheduling parameter to the task object:
https://docs.dhtmlx.com/gantt/desktop__auto_scheduling.html#disablingautoschedulingforspecifictasks

Right now, exporting the Manual property is not supported.
But you can export it as a custom property by using the function in the tasks parameter of the export function:

    gantt.exportToMSProject({
        tasks: {
            'Manual': function (task) {
                if (task.auto_scheduling === undefined || task.auto_scheduling) {
                    return 1;
                }
                else {
                    return 0
                }
            },
        }
    });

https://docs.dhtmlx.com/gantt/desktop__export_msproject.html#:~:text=the%20project%20calendar.-,Export%20settings,-The%20exportToMSProject()%20method

Here is an example in the snippet:
https://snippet.dhtmlx.com/tqpiqakz


Another question, is how to set custom LagFormat value on PredecessorLink Object, inside of Task object.

That depends on where exactly you want to put it.
If you replace the default value with a custom value in the link object, it won’t work correctly as Gantt will consider it as a link without lag.

If you want to change what is displayed to the user and how the lag is edited, you can use the formatters:
https://docs.dhtmlx.com/gantt/desktop__formatters_ext.html#linkformatter
Here is an example:
https://snippet.dhtmlx.com/cwx96npn

If you want to change the format in the exported file, it is also not supported. You can only export it as a custom attribute:
https://snippet.dhtmlx.com/hlslgawf