Hello Henk,
you can try to use this. You must first connect to your application, then add the termbase you want to open, select an export definition and from it run the export process. This means that the path where the export has to be saved has to be entered previously in your export definition (otherwise, it won't export anything, or maybe but I don't know where :o))
That the basic idea of exporting from multiterm (2014)
Kind regards
Sébastien
private void exportFromSDLTB(string fileLocation)
{
Sdl.MultiTerm.TMO.Interop.Application oMt = new Sdl.MultiTerm.TMO.Interop.Application();
TermbaseRepository rep = oMt.LocalRepository;
try
{
rep.Connect("", "");
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString() + "\nConnection to local termbase failed");
}
Termbases oTbs2 = rep.Termbases;
oTbs2.Add(fileLocation, "", "");
//load the termbase
Termbase oTb2 = oTbs2[fileLocation];
//export
ExportDefinition oExp = oTb2.ExportDefinitions[0];
oExp.ProcessExport(MtTaskType.mtScript);
}
Hello Sébastien,
Thank you so much. It works. I had to duplicate the default export definition and enter the target filename there.
Best regards,
Henk
I realize its been a while, but do you happen to remember anything to related to this? "I had to duplicate the default export definition and enter the target filename there."? Where do you enter the target file name?
I realize its been a while, but do you happen to remember anything to related to this? "I had to duplicate the default export definition and enter the target filename there."? Where do you enter the target file name?