Skip to main content
Inspiring
September 17, 2022
Answered

ExportIDMLDirect taskinfo status never takes value of completed

  • September 17, 2022
  • 1 reply
  • 139 views

I'm exporting indd file to idml and I need to wait for completion because I need to open the idml just after the export, I'm using this code:

iExportManager->ExportIDMLDirect(ref, &copyFileId, kFalse, &taskInfo);

while (taskInfo.GetCurrentState() != TaskStatusInfo::TaskState::kCompleted) {
  printf("Task Status = %d", taskInfo.GetCurrentState());
  Sleep(100);
}

But the status is 0.. 1..2..2..2..2.. infinite 2 (finishing) and never is Completed?

Its waiting for the call function I suppose, where can I set the callback function and can I bypass using it and just checking the status of the task inside a while loop?

Any ideas?

This topic has been closed for replies.
Correct answer Amine9
taskInfo.WaitForTask();

1 reply

Amine9AuthorCorrect answer
Inspiring
September 18, 2022
taskInfo.WaitForTask();