Search code examples
javams-projectmpxj

How to set MSPDI project properties with MPXJ library?


Hy, I am trying to create MSPDI (.xml) file using MPXJ library. I've managed to add tasks and resources but I have problem with setting project Title, etc.

I have checked examples on SourceForge and can't find how to set ProjectProperties to ProjectFile. There is only get method.

Any help or suggestions would be great :)

BR, Vid Kraner


Solution

  • Here's some example code from MpxjCreate.java which shows properties being set:

      ProjectProperties properties = file.getProjectProperties();
      properties.setStartDate(df.parse("01/01/2003"));
      properties.setProjectTitle("Created by MPXJ");
      properties.setAuthor("Jon Iles");