RunAutomaticTask ConvertToTranslatableFormat Fails in Version 2022_17.0.4.13209

I am using  TradosStudio2022_17.0.4.13209.exe

And I try the sample code from here:

https://github.com/RWS/trados-studio-api-samples/blob/master/ProjectAutomation/Sdl.SDK.ProjectAutomation.Samples.Examples/ProjectCreator.cs


This code below should create the xliff file:

Guid[] fileId = { sourceFiles[i].Id };
AutomaticTask convertTask = project.RunAutomaticTask(fileId, AutomaticTaskTemplateIds.ConvertToTranslatableFormat);
CheckEvents(taskStatusEventArgsList, messageEventArgsList);

switch (convertTask.Status)
{
        case TaskStatus.Failed:
                foreach (ExecutionMessage oMessage in convertTask.Messages) {
                     Debug.Print(oMessage.Message);
               }
               break;
}

I get the following error:

"Object reference not set to an instance of an object."
When I check the source language folder, there is no Xliff file. 

My code is running since 2014. The error occurs since version 2022_17.0.3.11695.
It occurs for all formats: docx, pptx, etc.

Can anybody help?

Regards

Martin Bächtold


emoji