Reading and Writing General Resource Properties
Contents
[
Hide
Show
]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:
- From the View menu, select More Views and then Resource Sheet.
- From the Insert menu, select Column.
- Add the Start, Finish, ID and unique ID columns.
Setting General Resource Properties using Aspose.Tasks
The following example shows how to set general resource properties.
1// Add resources
2Resource resource = project.Resources.Add("Rsc");
3
4// Set resource properties, Resource properties are represented by static class Rsc
5resource.Set(Rsc.StandardRate, 15);
6resource.Set(Rsc.OvertimeRate, 20);