converts an XML or XAR Primavera P6 file to JSON
config | object | an object with configuration properties of an imported file |
gantt.importFromPrimaveraP6({
data: file,
taskProperties: ["Notes", "Name"],
callback: function (project) {
if (project) {
gantt.clearAll();
if (project.config.duration_unit) {
gantt.config.duration_unit = project.config.duration_unit;
}
gantt.parse(project.data);
}
}
});
This functionality is currently in Beta stage. The information given in this article may be substantially changed before the feature enters its stable stage.
The method requires HTML5 File API support.
This method is defined in the export extension, so you need to include it on the page:
<script src="http://export.dhtmlx.com/gantt/api.js"></script>
Read the details in the Export and Import from MS Project article.
The method takes as a parameter an object with configuration properties of an imported file:
The response will contain a JSON of the following structure:
{
data: {},
config: {},
resources: [],
worktime: {}
}