Aspose Tasks - Get or Set Auto Schedule or Manual Schedule *per task

Need to Get and Set on the task level Auto Scheduled or Manually Schedule.

@TABDI

Can you please share the details of the requirements on your end along with source file and perhaps a snapshot that I can refer on my end to help you out.

I submitted a summary on the forum ticket… You cannot set a finish date or % complete on a task that is auto scheduled. Which does make sense. However, I would expect an Aspose API method to toggle (turn off or on) auto scheduling on the **Task level.

foundTask.Set(Tsk.PercentComplete, importTask.PercentComplete);

@TABDI

We are checking details on our end and will share the feedback with you as soon as possible.

@TABDI

Unfortunately, we are still unable to comprehend the requirements shared by you and therefore request you to please provide the information that we requested earlier so that we are in good position to help you. I also suggest you to please try using the following sample code for CalculationMode on project on your end and share if that works.

        Aspose.Tasks.Project project = new Project("test.mpp");
        Task foundTask = project.RootTask.Children.GetByUid(1);

        int percent = 30; // new percentage value
        project.CalculationMode = CalculationMode.Manual;
        foundTask.Set(Tsk.PercentComplete, percent);
        project.CalculationMode = CalculationMode.Automatic;

Thank you. So, in MS Project, you can set the calculation mode Per Task, not on the entire project. ie, some tasks are auto calculated, other tasks are manually calculated/scheduled. The code above (and what I found through the Aspose forums) shows setting the calculation mode on the **Project. Maybe I’m misunderstanding. I’ll try it out and see. Thank you

This is the property to set Auto/Manual Scheduled per **Task
.Set(Tsk.IsManual, true)

var newTask = foundParentTask.Children.Add();
newTask.Set(Tsk.IsManual, true);

Not sure where the misunderstanding was coming from, " Get or Set Auto Schedule or Manual Schedule *per task"

@TABDI

Does the shared example has resolved your requirements or there is still any issue?

newTask.Set(Tsk.IsManual, true); does solve the issue because it sets the calculation mode on the Task itself, not on the entire project as a whole.

Thanks

@TABDI

It’s good to hear that things are fine on your end.

Thank you, appreciate it.