Hello everyone,
I have a problem to create a link between tasks in two MS Project files.
Task t2 = t2 = parent.getChildren().add(“Another projet task”);
t2.set(Tsk.EXTERNAL_TASK_PROJECT, “xxxxx\\00100200000.mpp”);
t2.set(Tsk.EXTERNAL_ID, 30);
t2.set(Tsk.IS_EXTERNAL_TASK, true);
t2.set(Tsk.IS_MANUAL, new NullableBool(false));
t2.set(Tsk.IS_SUMMARY, false);
Task t = parent.add(“task”);
TaskLink link = project.getTaskLinks().add(t2, t);
link.setCrossProject(true);
link.setLinkType(TaskLinkType.FinishToStart);
link.setCrossProjectName(“xxx\\00100200000.mpp\\30”);
When I open the generated file, the link is made to the id 0 task of the other project.
image.png (9.9 KB)
Predecessor column contains id=0 instead of id=30 (of course, id 30 exists in linked file)
xxx\00100200000.mpp\0
Is it possible to link projects?
Do I have to read the linked project to link a task to it?
Does the linked project have to be accessible?
Thank you for your help.