Creating Termbase with MultiTerm SDK: Created Termbase is corrupt

Hello,

i am trying to create a Termbase in C#, using the example from the SDK. My
source code looks like this:

using Sdl.MultiTerm.TMO.Interop;

Sdl.MultiTerm.TMO.Interop.Application oMt = new Sdl.MultiTerm.TMO.Interop.ApplicationClass();
TermbaseRepository rep = oMt.LocalRepository; rep.Connect("","");
Termbases tbs = rep.Termbases; Termbase tb = tbs.New("name", "description", "C:/ent/SyncMultiTerm/test.xdt", "C:/ent/SyncMultiTerm/cs.sdltb");
rep.Disconnect();

I am using the xdt file attached to this post. If i create the termbase
manually, the sdltb file is created, and for each language there are
additional mdf and mdt files.
If i am using this script, only the sdltb file is created, and if i am trying
to open the sdltb in the MultiTerm Desktop GUI, i get an error. You can find
a screenshot an an xml of the error message in the attachment.

I tried this with MultiTerm Desktop 2011 as well as 2014, and got the same
error. Is this a BUG in the SDK, or am i doing something wrong?

Regards,
Mario Trojan

error.zip
Parents
  • It seems to be neither. Your code is fine, and the error is reproducable with the data you provided. I can't currently pinpoint the exact cause, but it appears something is the problem with your xdt file. Judging by the formatting of the file, it was not exported from MultiTerm. It is strange that MultiTerm desktop can handle it, while the API can't; I assume there are some additional steps in MT that you don't get in the API.

    I know that doesn't solve your immediate issue, but try to use a different xdt, for example export one from the sample termbase. That would confirm that your code is working correctly as it is.

Reply
  • It seems to be neither. Your code is fine, and the error is reproducable with the data you provided. I can't currently pinpoint the exact cause, but it appears something is the problem with your xdt file. Judging by the formatting of the file, it was not exported from MultiTerm. It is strange that MultiTerm desktop can handle it, while the API can't; I assume there are some additional steps in MT that you don't get in the API.

    I know that doesn't solve your immediate issue, but try to use a different xdt, for example export one from the sample termbase. That would confirm that your code is working correctly as it is.

Children