Today, I am looking at the creation of a project task and assign reources with a project addin for use with PJ Professional 2013.
Using the Addin template @ http://msdn.microsoft.com/en-us/library/cc668209.aspx I decided to extend the demo code with a method to create a Material Resource Type.
How will I express a Resource as Material? .. I have tried an Int and String approach without success
void Application_NewResource(Microsoft.Office.Interop.MSProject.Project pj)
{
MSProject.Resource newResource = pj.Resources.Add
("This text was added by using code", missing);
newResource.CostCenter = "Very Big Building - Basement";
newResource.Type = ????; // coughed bigtime on Int and Strings...
newResource.Name = "Drywall Board";
}