Reading a P6 .xer into Aspose.Tasks, and trying to find currency information. Within P6 currency is a table of available currencies and the monetary data is always stored internally in the currency designated as the “Base”. And it’s a user preference that dictates which currency will used for display.
In the Aspose object the data returned in the project level value appears to always be the last currency in the list. Would it be possible to have this return the “Base” currency?
string fileName = @"C:\Users\legland\OneDrive - Palisade Corporation\Documents\_Projects\SRA\Test Files\DTS-3439\Birthday Party.xer";
//string fileName = @"C:\Users\legland\OneDrive - Palisade Corporation\Documents\_Projects\SRA\Test Files\Samples\Small - Primavera 1\baseline.xer";
Project m_Project = new Project(fileName);
Console.WriteLine("{0} {1}", "CurrencyCode", m_Project.Get(Prj.CurrencyCode));
Console.WriteLine("{0} {1}", "CurrencyDigits", m_Project.Get(Prj.CurrencyDigits));
Console.WriteLine("{0} {1}", "CurrencySymbol", m_Project.Get(Prj.CurrencySymbol));
Console.WriteLine("{0} {1}", "CurrencySymbolPosition", m_Project.Get(Prj.CurrencySymbolPosition));
In this example, the base for the schedule is US Dollars (USD). The last item in the currency table is Uruguayan Peso (UYU). The code sample above returns UYU.
Birthday Party.zip (5.3 KB)
P6_Currency_Base.png (23.5 KB)
P6_Currency_Bottom.png (24.3 KB)
TestProgramOutput.png (18.6 KB)