public static void Run()
{
// ExStart:RenderTaskUsageView
// Create project instance
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName);
Project project1 = new Project(dataDir + "TaskUsageView.mpp");
// Define the SaveOptions with required TimeScale settings as Days
SaveOptions options = new PdfSaveOptions();
options.Timescale = Timescale.Days;
// Set the Presentation format to ResourceUsage
options.PresentationFormat = PresentationFormat.TaskUsage;
// Save the Project
string outputProject = "project_TaskUsageView_result_days_out.pdf";
project1.Save(dataDir + outputProject, options);
// Set the Tiemscale settings to ThirdsOfMonths
options.Timescale = Timescale.ThirdsOfMonths;
// Save the Project
outputProject = "project_TaskUsageView_result_thirdsOfMonths_out.pdf";
project1.Save(dataDir + outputProject, options);
// Set the Timescale settings to Months
options.Timescale = Timescale.Months;
// Save the project
outputProject = "project_TaskUsageView_result_months_out.pdf";
project1.Save(dataDir + outputProject, options);
// ExEnd:RenderTaskUsageView
}
}