Working with Resource Properties

The Resource class has a number of properties for getting and setting resource attributes:

  • Name gets and sets a resource’s name (string).
  • Id gets and sets a resource’s ID (integer).
  • Uid gets and sets a resource’s UID (integer).
  • Start gets and sets a resource’s start date (DateTime).
  • Finish gets and sets a resource’s end date (DateTime).

Working with General Resource Properties

To view a resource’s general properties in Microsoft Project:

  1. From the View menu, select More Views and then Resource Sheet.
  2. From the Insert menu, select Column.
  3. Add the Start, Finish, ID and unique ID columns.

Setting General Resource Properties using Aspose.Tasks

The following code example demonstrates how to set general resource properties.

1// Add resources
2System::SharedPtr<Resource> rsc1 = project->get_Resources()->Add(u"Rsc");
3    
4// Set resource properties, Resource properties are represented by static class Rsc
5rsc1->Set<System::Decimal>(Rsc::StandardRate(), static_cast<System::Decimal>(15));
6rsc1->Set<System::Decimal>(Rsc::OvertimeRate(), static_cast<System::Decimal>(20));
Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.