MultiTerm v8/9 API issues - COM automation question

Hi,

We are having an issue with the MultiTerm v8/v9 COM automation API

We are using your multiterm dll: (C:\Program Files (x86)\SDL\SDL MultiTerm\MultiTerm8\Sdl.MultiTerm.Interop.MTTMO2.dll) from a .NET application.

The COM object gets created correctly and the functions appear to work but we cannot list the available termbases (count is always 0).

We cannot use the Add and the New functions either (our actual intentions, we are writing an import tool)

These function return errors.

Can you please instruct us what we are doing wrong.

This was the reply from the MultiTerm architect:

---------------

termbases.Add("e:\\t3.sdltb", "t3", "t3");

                Sdl.MultiTerm.Interop.MTTMO2.Termbase tbNew = termbases["t3"];

 

                needs to be

 

                termbases.Add("e:\\t3.sdltb", "t3", "t3");

                Sdl.MultiTerm.Interop.MTTMO2.Termbase tbNew = termbases["e:\\t3.sdltb"];

               

                or

 

                termbases.Add("e:\\t3.sdltb", "t3", "t3");

                Sdl.MultiTerm.Interop.MTTMO2.Termbase tbNew = termbases[0];

 

                Local termbases have to be index by full path. This is necessary since

                the name is not unique. Nothing stops you from adding 3 termbases

                in 3 locations and calling all of them "test" .

 

Item property

Name

MultiTermIX.Termbases.Item — Provides programmatic access to a specific termbase.

Type

MultiTermIX.Termbase

(read)

Index Parameters

  • Index      (Variant)

Description

This property allows you to gain access to a particular termbase from the repository.

----------------------

We have tested your proposal but unfortunately, this does not solve the issue.
I think some other problem is occuring.
I have done some additional extensive testing in C#, VBA and VB.NET but I cannot get the COM automation object to work
I'll clarify a bit what we encounter below and I you'll find some screenshots below.
I can also send you the test applications and Excel .xlsm files which might be easier for you to identify what we are doing wrong.

Info / Observations

1. The tests were performed on a windows 7 with both SDL Desktop 2009 & 2011 installed together with the SDKs
The tests were also performed on a development machine with only SDL Desktop 2009. Some tests were also performed on production machines (no SDK)

2. Not only does the Termbases.Add and Termbases.New fail, the Termbases.Count always returns 0

Questions

1. Do we need to specify TermbaseRepository.Connect("","") or Connect("local","local") or are the parameters irrelevant for LocalRepository

2. Any idea why the Count is always 0 ? Do we have to set the current working directory to a certain path? How does the DLL find the termbases repository?

3. Is it necesarry / relevant that SDL MultiTerm Desktop is launched?

4. Is it necesarry/prohibited that the termbases are opened in SDL MultiTerm Desktop (= visible in termbases list?)

5. Can you examine / test my Excel.VBA ? Does this work for you? Any idea why I get the errorcode in screenshot 1?

6. Can you examine / test my C# and VB.NET code ? Does this work for you? Any idea why I get the errorcode in screenshot 2 & 3?
   Uploaded as sip.zip to this post (just remove zip extension, because sip is not allowed)


 

                                                 
 
 

testmultitermitf20120619.sip.zip
Parents
  • Hi Thomas,

    One of our developers took a quick look at this and suggested the following:

     

    1. Do we need to specify TermbaseRepository.Connect("","") or Connect("local","local") or are the parameters irrelevant for LocalRepository

    Use ("", "")

     

    2. Any idea why the Count is always 0 ? Do we have to set the current working directory to a certain path? How does the DLL find the termbases repository?

    The local repository does not remember previously used termbases. It's up to the calling application to keep a list of local termbases and add them.  2007 had a database for this, and the amount of problems we got by this database being out of sync with the files on disk were immense. It was a common user request to just browse for files instead.

     

    3. Is it necesarry / relevant that SDL MultiTerm Desktop is launched?

    No.

     

    4. Is it necesarry/prohibited that the termbases are opened in SDL MultiTerm Desktop (= visible in termbases list?)

    No.

     

    5. Can you examine / test my Excel.VBA ? Does this work for you? Any idea why I get the errorcode in screenshot 1?

    We don't really do VBA, but it looks like the same thing as C#: trying to add a file that does not exist.

     

    6. Can you examine / test my C# and VB.NET code ? Does this work for you? Any idea why I get the errorcode in screenshot 2 & 3?   

     

    It works with a few fixes. I can reproduce the error by using paths to non-existent termbases in Add, and a directory instead of a file path in Create.  See comments in attached working (at least here...) code

     

    Regards

    Paul (Gerhard :-))

     

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    fName.cs
  • Thanks Paul,

    This clarifies a lot, I will be needing the .New function as I want to create .sdltb files (I am writing an import tool)

    I'll try your suggestions and let you know of the progress

    PS. You might want to review your 'SDL MultiTerm 2009 Desktop SDK' CHM file. Explanation is sparse and examples like

    oTbs.New("New Termbase File Name", "Optional Description", "c:\\temp\\test.xdt","c:\\temp\\");  

    were the root of my problems.

  • Hi Thomas,

    Just a quick follow up on this.  Can you make sure you are using the latest version of the SDK help?  The developer checked the documentation and we had already amended the worst errors in the SDL help around local termbases, so it looked a little as though you may have been using an older version of the help file.

    But this is an ongoing piece of work, changing to correct things that are wrong and also changing to accommodate new features and requirements that we put into the software.  So your comments, and difficulties, are noted... but do check just in case :-)

    Thanks

    Paul

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Reply
  • Hi Thomas,

    Just a quick follow up on this.  Can you make sure you are using the latest version of the SDK help?  The developer checked the documentation and we had already amended the worst errors in the SDL help around local termbases, so it looked a little as though you may have been using an older version of the help file.

    But this is an ongoing piece of work, changing to correct things that are wrong and also changing to accommodate new features and requirements that we put into the software.  So your comments, and difficulties, are noted... but do check just in case :-)

    Thanks

    Paul

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Children