AddPredecessor for a task based on the taskid instead of the task object

Hi,

I am new to ASPOSE, i started creating an MPX file in a web project.

I have a list of tasks to be added to the file and a few predecssors among the list of tasks. when i was playing withe the "AddPredecessor" method of the Task class. I found that i have to pass the TASK object to the "AddPredecessor" function.

Is there a way where i can pass the TaskID instead of the task object. If not can i acheive the same using the Task Array?

Any help will be greatly appreciated.

Thanks

I am still waiting for a reply. I am using the evaluation version of the software. We have to decide on buying the licences of the software once we run a complete test on the software based on our requirements.

Also is there a method which returns a TASK object based on the TaskID?

Thanks

Dear csnbharathi,

I have forwarded your request and you will be answered soon. Thank you for your patience.

Hello,

Yes, you should use Task object to set predecessors.
MPXFile class contains many useful methods. Please check MPXFile class api.
To get Task by TaskId you can use MPXFile.GetTaskByID() method.
function go(url)
{
window.open(url, “_self”);
}

	    function OpenInNewWindow(url)
	    {
		    go(url);
	    }