Thursday, January 12, 2012

Aspose.Tasks in MS Project Resource Uids


When using Aspose.Tasks to generate an XML file for Microsoft Project, if one of the resource’s uid is set to 0 and it has been used on an assignment, the assignment will not be shown once the xml file is opened in Microsoft Project. To prevent this, always set the resource.uid to a positive non zero integer value.
Aspose.Tasks.Resource resource = new Aspose.Tasks.Resource("Name");      
resource.Uid = resourceIDCounter++;

Note that a function call to CalcResourceUids of the Aspose.Tasks.Project will reset the Uid value.
_project.CalcResourceUids();

No comments:

Post a Comment