You are currently working on UAT 

Sdl Sdk Project Automation Use Template and PreTranslateFiles using Server Based Translation Memories

How is it possible to run AutomaticTask.PreTranslateFiles, using server based Translation Memories?

MainTranslationProviderItem Uri="sdltm.gsdemo.gs.sdlproducts.com/ Global Solution Consultants%2FBC Translation Productivity%2FSDL EMEA LSP%2FSDL LSP Trials%2F{CompanyName}&tmName={TmName}" Enabled="true
private void RunAutomaticTask(FileBasedProject ThisSdlProject, string TargetLanguageCode){
    ProjectFile[] targetFiles = ThisSdlProject.GetTargetLanguageFiles(new Language(CultureInfo.GetCultureInfo(TargetLanguageCode)));
    AutomaticTask preTranslate = ThisSdlProject.RunAutomaticTask(targetFiles.GetIds(), AutomaticTaskTemplateIds.PreTranslateFiles);
}

I get the error: "The current parameters are not compatible with the Translation Provider Uri Schema"

Parents Reply
  • The SdlTemplate was created within "Trados Studio 2019 SR2 15.2.5.2145"; from project; and adding a server-based translation memory. So it is studio that is adding this to the template, not me.

    Either way, from Andrea's suggestion, I was able to create a project from the template and am no longer getting the Uri schema error.

    But I am still not able to programmatically pre-translate using the template/server Tm.

    My reply above shows my current code and the error that appears in the SDLProj file -> Reports:

    <Messages Level="Error" Message="Unexpected exception when configuring file multiFileConverter for task 'Pre-translate Files': Failed to create an instance of translation provider 'sdltm.gsdemo.gs.sdlproducts.com/ Global Solution Consultants%2FBC Translation Productivity%2FSDL EMEA LSP%2FSDL LSP Trials%2F{COMPANY}&amp;tmName=Fruits TM'.." Source="Pre-translate Files">

    Any thoughts?

    Thanks

Children