aspose-tasks-for-net

We are pleased to announce the release of Aspose.Tasks for .NET 18.2. This new version of API introduces a new feature of renumbering WBS Codes for tasks like the Renumber function of Microsoft Project. It also provides an enhancement to get page count from a document for defined start and end dates. For a detailed note on what is new and fixed, you can visit the release notes section of API documentation.

Renumber WBS Codes in MS Project in C#

Aspose.Tasks for .NET API lets you work with WBS codes associated with tasks in a project. This latest release of API introduces a new feature of Renumbering WBS codes for tasks like Microsoft Project’s Renumber functionality. It lets you renumber all or selective WBS codes of tasks in a project as shown in the following code sample.

Get Page Count for Specific Dates in Project

This release also introduces an enhancement for getting the number of pages based on specified Start and End dates. This feature can be used to get specific page count for specified dates even during conversion to various output formats.

Project project = new Project(dataDir + "GetNumberOfPages.mpp");

var options = new ImageSaveOptions(SaveFileFormat.PNG)
{
    SaveToSeparateFiles = true,
    PageSize = PageSize.A3,
    Timescale = Timescale.Months,
    StartDate = project.Get(Prj.StartDate) - TimeSpan.FromDays(10),
    EndDate = project.Get(Prj.FinishDate) + TimeSpan.FromDays(30)
};
int pageCount = project.GetPageCount(
    PageSize.A3,
    Timescale.Months,
    project.Get(Prj.StartDate) - TimeSpan.FromDays(10),
    project.Get(Prj.FinishDate) + TimeSpan.FromDays(30));

Console.WriteLine(pageCount); 

API Resources

You may visit the following API resources for getting started and working with the API.