public static void Run()
{
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName);
// ExStart:RenderResourceUsageView
// Create project instance
Project project1 = new Project(dataDir + "ResourceUsageView.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.ResourceUsage;
// Save the Project
string outputFile = "result_ResourceUsageView_days_out.pdf";
project1.Save(dataDir + outputFile, options);
// Set the Tiemscale settings to ThirdsOfMonths and save the Project
options.Timescale = Timescale.ThirdsOfMonths;
outputFile = "result_ResourceUsageView_thirdsOfMonths_out.pdf";
project1.Save(dataDir + outputFile, options);
// Set the Timescale settings to Months and save the Project
options.Timescale = Timescale.Months;
outputFile = "result_ResourceUsageView_months_out.pdf";
project1.Save(dataDir + outputFile, options);
// ExEnd:RenderResourceUsageView
}
}