Reading and Writing General Resource Properties

In Microsoft Project, each resource is defined by a set of general properties that uniquely identify it and determine its availability within a project. These attributes include the resource’s name, identifiers (ID/UID), and time availability (start and finish dates). With Aspose.Tasks for .NET, developers can easily read and modify these general properties directly from Microsoft Project files (MPP/XML). This enables programmatic control over resource management without relying on Microsoft Project, making it useful for custom reporting, data synchronization, or project automation tools.

General Resource Properties

The Resource class provides several important properties:

These properties ensure that each resource is properly identified and scheduled within a project plan.

Working with General Resource Properties

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

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

This provides visibility into the core attributes of project resources.

Setting General Resource Properties using Aspose.Tasks

The following code example demonstrates how to set general resource properties programmatically. This snippet creates or updates a resource by assigning values to its Name, Id, Uid, Start, and Finish properties. Such automation helps streamline resource initialization or synchronization across multiple project files.

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);

FAQ

Q: What is the difference between Id and Uid?

Q: Can I set custom start and finish dates for resources?

Q: Which formats support reading and writing resource properties?

Q: Can I bulk update resource properties?

Conclusion

Managing general resource properties is fundamental for organizing and scheduling resources in project plans. With Aspose.Tasks for .NET, developers can easily read, update, and control resource identifiers, names, and availability dates directly from Microsoft Project files. This provides flexibility for automation, integration, and custom project management solutions without requiring Microsoft Project itself.

Subscribe to Aspose Product Updates

Get monthly newsletters & offers directly delivered to your mailbox.