Project Automation using template

I am getting to grips with the Project Automation API, and have successfully setup the BatchAnalyzer / Project Creation process from the API example code.

What I would like to do is integrate the CreateBasedOnTemplate function into the BatchAnalyzer example.

Is there a working example of this?

I have searched online, and found a couple of examples, but can’t seem to find one that integrates both.

There is this: http://producthelp.sdl.com/SDK/ProjectAutomationApi/3.0/html/2a55e675-f66d-4c81-9452-355cd9f46f35.htm

But I am unsure where this would go in the ProjectCreator.cs code (if this is the correct place for it to go?).

Thanks in advance

Parents Reply
  • Brilliant. Have implemented the parser to successfully pull the correct TM file from the template.

    However, when running the exe, I now get the error:
    The combination of Uri and State properties for the main translation providers should be unique within the list of entries.

    This error only appears when I add the ", template" to:
    FileBasedProject newProject = new FileBasedProject(this.GetProjectInfo(srcLocale, trgLocale, targetFolder), template);

    The template only has one TM listed in the template, but it doesn't have a State attribute:
    <MainTranslationProviderItem Uri="sdltm.file:///PATH-TO-TM/TM-FILENAMEsdltm" Enabled="true" />

    I then added State="unique", and it processed as expected.
    But I cannot see a state setting within Trados TM Settings, so how does this attribute set assigned?

    Thanks.

Children
No Data