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

Free Support Forum - aspose.com

Migrating over to 8.0 - various issues - what is the proper syntax

I am migrating over to 8,0 and can't find the proper syntax for the following:
The new task is called '_task'

HOW TO SET
durationTime
NewTasksAreManual
IsScheduleFromStart
NewTasksAreManual


My code is failing:
_task.[Set](Tsk.Duration, _durationTime)
_task.Duration = New TimeSpan(_durationTime, 0, 0)
_newProject.NewTasksAreManual = False
Task.Recalculate(_task)
_newProject.NewTasksAreManual = False
_newProject.IsScheduleFromStart = True
_newProject.[Set](Prj.NewTasksAreManual, False)

Hi,

Please use the following sample code with the new API. Please note the usage of Set and Get methods with Project and Task classes which uses members from static classes Prj and Tsk. Let us know if we can be of any help to you in this regard.

Sample Code:


Dim project As New Project()


project.[Set](Prj.StartDate, DateTime.Now)


project.[Set](Prj.NewTasksAreManual, True) 'new Tasks are manual

project.[Set](Prj.ScheduleFromStart, True)


'
Set schedule from start date to true

Dim task As Task = project.RootTask.Children.Add(“Task1”)


'Set Task Duration

task.[Set](Tsk.Duration, project.GetDuration(16, TimeUnitType.Hour))


project.Recalculate()