Read Custom and Built-in Properties

In Aspose.Tasks for C++ the custom properties are available through the typed collection CustomProjectPropertyCollection which is accessible using get_CustomProps given in Project class whereas the built-in properties are available using get_BuiltInProps representing BuiltInProjectPropertyCollection.

The following code example demonstrates how to read built-in properties.

 1// The path to the documents directory.
 2System::String dataDir = RunExamples::GetDataDir(System::Reflection::MethodBase::GetCurrentMethod(ASPOSE_CURRENT_FUNCTION)->get_DeclaringType().get_FullName());
 3
 4// Create a project reader instance
 5System::SharedPtr<Project> project = System::MakeObject<Project>(dataDir + u"ReadProjectInfo.mpp");
 6
 7// Built-in properties are available directly:
 8System::Console::WriteLine(u"Author: " +  project->get_BuiltInProps()->get_Author());
 9System::Console::WriteLine(u"Category: " + project->get_BuiltInProps()->get_Category());
10System::Console::WriteLine(u"Comments: " + project->get_BuiltInProps()->get_Comments());
11System::Console::WriteLine(u"Company: " + project->get_BuiltInProps()->get_Company());
12System::Console::WriteLine(u"HyperlinkBase: " + project->get_BuiltInProps()->get_HyperlinkBase());
13System::Console::WriteLine(u"IsReadOnly: " + project->get_BuiltInProps()->get_IsReadOnly());
14System::Console::WriteLine(u"Keywords: " + project->get_BuiltInProps()->get_Keywords());
15System::Console::WriteLine(u"Manager: " + project->get_BuiltInProps()->get_Manager());
16System::Console::WriteLine(u"Subject: " + project->get_BuiltInProps()->get_Subject());
17System::Console::WriteLine(u"Title: " + project->get_BuiltInProps()->get_Title());
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.