Hi!
Hi Doug,
Thank you for writing to Aspose support team.
Resource assignment is calculated by using the resource “Standard Rate” multiplied by number of hours worked by the resource. In the following example a 6 days task is assigned to a resource whose standard rate is $10. As total work hours are 8*6=48, therefore total resource assignment cost is $480. Could you please give a try to the following sample code and let us know the feedback?
Project project = new Project();
project.Set(Prj.StartDate, new DateTime(2015, 7, 1, 8, 0, 0));
project.Set(Prj.NewTasksAreManual, false);
Task task = project.RootTask.Children.Add("Task");
Resource rsc = project.Resources.Add("Rsc");
rsc.Set(Rsc.StandardRate, 10);
// 6 days duration
task.Set(Tsk.Duration, project.GetDuration(6));
ResourceAssignment assn = project.ResourceAssignments.Add(task, rsc);
Console.WriteLine("Assignment cost = " + assn.Get(Asn.Cost));
project.Save(path + "Output.xml", SaveFileFormat.XML);
Your explanation “Resource assignment is calculated by using the resource “Standard Rate” multiplied by number of hours worked” kind of answers my question.
What I would like to be able to do is the following:
Hi Doug,
Thank you very much! This is exactly what I needed to get these rolling the way I need. Your help has been timely and most beneficial!
Hi Doug,