public static void gettingcurrencysymbol() {
    // The path to the documents directory.
    String dataDir = Utils.getDataDir(CurrencySymbols.class);

    Project project = new Project(dataDir + "project5.mpp");
    System.out.println(project.get(Prj.CURRENCY_SYMBOL));
  }
  public static void settingcurrencysymbol() {
    // The path to the documents directory.
    String dataDir = Utils.getDataDir(CurrencySymbols.class);

    Project project = new Project();
    project.set(Prj.CURRENCY_SYMBOL, "$$");
  }
  public static void UsingSvgOptions(String projectName) {
    // Read the input Project file
    Project project = new Project(projectName);

    SaveOptions opt = new SvgOptions();
    opt.setFitContent(true);
    opt.setTimescale(Timescale.ThirdsOfMonths);
    project.save("FileName5.svg", opt);
  }
  public static void main(String[] args) throws Exception {
    // The path to the documents directory.
    String dataDir = "src/programmersguide/workingwithcalendars/definingweekdays/data/";

    // Create a project instance
    Project prj = new Project();

    // Define Calendar
    Calendar cal = prj.getCalendars().add("Calendar1");

    // Add working days monday through thursday with default timings
    cal.getWeekDays().add(WeekDay.createDefaultWorkingDay(DayType.Monday));
    cal.getWeekDays().add(WeekDay.createDefaultWorkingDay(DayType.Tuesday));
    cal.getWeekDays().add(WeekDay.createDefaultWorkingDay(DayType.Wednesday));
    cal.getWeekDays().add(WeekDay.createDefaultWorkingDay(DayType.Thursday));
    cal.getWeekDays().add(new WeekDay(DayType.Saturday));
    cal.getWeekDays().add(new WeekDay(DayType.Sunday));

    // Set friday as short working day
    WeekDay myWeekDay = new WeekDay(DayType.Friday);

    // Sets working time. Only time part of DateTime is important
    WorkingTime wt1 = new WorkingTime();
    java.util.Calendar calTime = java.util.Calendar.getInstance();

    calTime.set(1, 1, 1, 9, 0, 0);
    Date date = calTime.getTime();
    wt1.setFromTime(date);

    calTime.set(1, 1, 1, 12, 0, 0);
    date = calTime.getTime();
    wt1.setToTime(date);

    WorkingTime wt2 = new WorkingTime();

    calTime.set(1, 1, 1, 13, 0, 0);
    date = calTime.getTime();
    wt2.setFromTime(date);

    calTime.set(1, 1, 1, 16, 0, 0);
    date = calTime.getTime();
    wt2.setToTime(date);

    myWeekDay.getWorkingTimes().add(wt1);
    myWeekDay.getWorkingTimes().add(wt2);
    myWeekDay.setDayWorking(true);
    cal.getWeekDays().add(myWeekDay);

    // Save the Project
    prj.save("Project.Xml", SaveFileFormat.XML);

    // Display result of conversion.
    System.out.println("Process completed Successfully");
  }
  public static void main(String[] args) throws Exception {
    // The path to the documents directory.
    String dataDir = Utils.getDataDir(WriteProjectInfo.class);

    // Create a project instance
    Project project = new Project();
    // Set project information properties
    project.set(Prj.SCHEDULE_FROM_START, new NullableBool(true));
    java.util.Calendar cal = java.util.Calendar.getInstance();
    cal.set(2014, 7, 10);
    project.set(Prj.START_DATE, cal.getTime());
    project.set(Prj.CURRENT_DATE, cal.getTime());
    project.set(Prj.STATUS_DATE, cal.getTime());

    // Save the Project as XML
    project.save(dataDir + "project3.xml", SaveFileFormat.XML);
  }
 public static void SavingProjectDataAsSVG(String projectName) {
   // Read the input Project file
   Project project = new Project("Project5.mpp");
   // Save the Project as SVG
   project.save("Project5.SVG", SaveFileFormat.SVG);
 }