Managing Assignment Cost

Managing Assignment Cost

The ResourceAssignment class exposes several properties used to manage assignment cost:

To view assignment costs in Microsoft Project:

  1. On the Task Usage page, select the Insert menu and then Column.
  2. Add columns.

Getting Assignment Costs with Aspose.Tasks

The following code example demonstrates how to get task costs using Aspose.Tasks.

 1// Create project instance
 2System::SharedPtr<Project> project1 = System::MakeObject<Project>(dataDir + u"ResourceAssignmentCosts.mpp");
 3    
 4// Print resource assignment costs
 5    
 6{
 7    auto ra_enumerator = (project1->get_ResourceAssignments())->GetEnumerator();
 8    decltype(ra_enumerator->get_Current()) ra;
 9    while (ra_enumerator->MoveNext() && (ra = ra_enumerator->get_Current(), true))
10    {
11        System::Console::WriteLine(ra->Get<System::Decimal>(Asn::Cost()));
12        System::Console::WriteLine(ra->Get<double>(Asn::ACWP()));
13        System::Console::WriteLine(ra->Get<double>(Asn::BCWP()));
14        System::Console::WriteLine(ra->Get<double>(Asn::BCWS()));
15    }
16}
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.