Hi Team,
Thanks for your responses !!!
I want to read few new columns i.e.
· Successor,
· Milestone
· % Complete
P Please let me know a way to read and write this.
Thanks
Abhishek Prasad
Hi Team,
Thanks for your responses !!!
I want to read few new columns i.e.
· Successor,
· Milestone
· % Complete
P Please let me know a way to read and write this.
Thanks
Abhishek Prasad
Hi Abhishek,
Thank you for writing to us again.
Please give a try to the following sample code which displays the required information.
Project proj = new Project(@“Blank2010.mpp”);
Task task1 = proj.RootTask.Children.Add(“Task 1”);
task1.Set(Tsk.Start, new DateTime(2016, 8, 3, 8 ,0,0));
task1.Set(Tsk.Duration, proj.GetDuration(8,TimeUnitType.Hour));
task1.Set(Tsk.IsMilestone, true);
task1.Set(Tsk.ActualStart, new DateTime(2016, 8, 3, 8, 0, 0));
task1.Set(Tsk.ActualDuration, proj.GetDuration(8, TimeUnitType.Hour));
Task task2 = proj.RootTask.Children.Add(“Task 2”);
task2.Set(Tsk.Duration, proj.GetDuration(8, TimeUnitType.Hour));
task2.Set(Tsk.Start, new DateTime(2016, 8, 4, 8, 0, 0));
TaskLink link = proj.TaskLinks.Add(task1, task2);
proj.Recalculate();
proj.Save(“output.mpp”,SaveFileFormat.MPP);