We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to get "Hour per day" field of project?


Could you tell me how to get the “Hour per day” field of project? Please see the picture as below. In the meantime, now the lag of TaskLinks equals 60hour pey day10, do you have any good way to covert the value to days?

Best Regards!

Hi Zhencheng,

You may please retrieve the Hour per day value using following sample code.

Project proj = new Project();

To convert the lag value to hours you may please divide it with 600. This is the simplest way of converting the value to days.

Is there any good reason behind changing the way these properties were get or set before in older versions?

We are upgrading from version 5.9 to current and we have to change lot of code now because of this.

Hi Vinayak,

Thank you for contacting Aspose support team.

Aspose.Tasks for .NET 8.0.0 and onward is a revamped version of the API that includes considerable changes from usage perspective. Key differences of both the implementations include:

  • Legacy API allowed to set public fields of various project data classes such as Project, Tasks, Resource, etc. while the new implementation introduces Set and Get methods to achieve the same .
  • Recalculate methods required to be called manually by user in the legacy API after certain operations such as Resource Assignments. The new Aspose.Tasks API performs most of such calculations automatically without user intervention required.
  • The new API provides manual as well as automatic recalculation modes similar to Microsoft Project (MSP). Manual mode calculates only the necessary fields whereas automatic mode recalculates everything. This eliminates the need of calling recalculating methods manually and improves overall API usage.

You may please visit following links to get detailed information:

Migration from earlier versions of Aspose.Tasks
Migrate to Aspose.Tasks for .NET 8.0.0 or higher