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);
}
I couldnt find the ProcessExport method in the CHM documenting the API.
I couldnt find the ProcessExport method in the CHM documenting the API.
Hello Michel,
I've just checked the help file and can't find the ProcessExport either. But you can refer to ProcessImport and the ImportDefinition/s classes, it's the same principle.
Kind regards
Sébastien
Hi Sebastien & Michel,
Here's the code you need:
Also, please note I've added a sample project in Code Samples in https://github.com/RWS/Sdl-Community
Best,
John