MultiTerm SDK API: Problems with description fields in an SDK Created Termbase

Got a bit of an odd one, well two actually.

I have a Definition XDT file, that contains:

  • Term_UUID = readonly
  • Image = Multimedia file

When I create a termbase via MultiTerm, the Term_UUID is (correctly) not editable, and I am able to select a file for the Image:

However, if I create a termbase via the MultiTerm SDK (using the same XDT file), the Term_UUID is available to edit and the Image filed, although defined as a "Multimedia File" is defaulted to text input.

 

Is there a known issue/fix for this?

Thanks 

Samuel

emoji
Parents
  • Hi Samuel Baldus, I need your XDT file in order to investigate the issue.

    Readonly should be set using Input Models, not XDT.

    emoji
  • Hi 

    I think I have found the reason why the descriptive fields are not working as expected.

    I created new termbases, one with the Desktop app and the other with the SDK API.

    Comparing the two termbases in MS Access, I noticed differences in the mtCatalogObjects and mtSystem tables.

    mtCatalogObjects

    • Desktop: ObjectID -2 and ObjectID 18 contains the entire XDT file
    • SDK: ObjectID -2 and ObjectID 18 contains only "<Output>"

    Side-by-side comparison of Trados Studio termbase tables in MS Access. Left: Desktop app with complete XDT file in mtCatalogObjects. Right: SDK API with incomplete XDT file, missing 'Object' and 'Tree' elements.

    mtSystem

    • Desktop: "definition" value contains the "Schema" element of the XDT file
    • SDK: "definition" value contains "<Schema name="Termbase Definition">"

    Comparison of mtSystem table in Trados Studio termbase. Left: Desktop app showing 'definition' with 'Schema' element. Right: SDK API with 'definition' missing 'Schema' element, only showing 'Termbase Definition'.

    I then copied the three values from the Desktop database to the SDK database, and tested the SDK in the Desktop App; and it now behaves correctly.

    Why these values are not being set correctly, I cannot answer but at least it might help solving the problem.

    Kind regards

    Samuel

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 1:32 PM (GMT 0) on 5 Mar 2024]
  • Update: It appears that we only need to "correct" the mtCatalogObjects['Description'] fields as a workaround.

    emoji
  • I have tried to replicate the issue (using MT 2022 latest release) but is working - for both local and remote termbases - the image field is correct.

    Definition looks the same for both termbases:

    Screenshot of Trados Studio showing languages English and German, entry structure with Entry_UUID, Note, Image, Term_UUID, and descriptive fields with types and history.

    There is an additional Note field that didn't appear in your screenshot - the xdt is the same?

    Can you also provide me the source code or a sample project that uses SDK and reproduce the issue?

    Thanks,

    Stefan

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 1:32 PM (GMT 0) on 5 Mar 2024]
  • The screenshot looks the same whether created with the Desktop/SDK, but that's not the problem.

    Have you actually tried to add an Image to a term in a termbase created with the SDK though?

    When I try using the termbase created with the SDK, it does not open the Multimedia File dialog, it reverts back to plain Text.

    You may also see the read-only Term_UUID field is also available to add, which also differs to when creating the termbase via the Desktop app. 

    emoji
  • Here is the simple code used to create the termbase via the SDK. 
    As you can see, this is pretty much straight off the SDK shelf.

    Application CreateTermbaseApplication = new Application();
    TermbaseRepository CreateTermbaseRepository = CreateTermbaseApplication.LocalRepository; CreateTermbaseRepository.Connect("", "");
    Termbases CreateTermbaseTermbases = CreateTermbaseRepository.Termbases;
    CreateTermbaseTermbases.New(TermbaseName,TermbaseDescription,XdtFilePath,TermbaseOutput);
    emoji
  • Yes, the SDK created termbase works with image:

    Screenshot of Trados Studio showing the termbase entry interface with 'GERMAN' language selected, an 'Add Term' button, and fields for 'Note' and 'Image' with a placeholder image and RWS logo.

    You should try to reinstall MT.

    In .csproj should be a <COMReference Include="MultiTermIX"> section. Does it look like this?

    <COMReference Include="MultiTermIX">
          <Guid>{ 76DBA48C -DA18 -4FB2 - BD45 - 32752C5BD73E }</Guid>
          <VersionMajor>17</VersionMajor>
          <VersionMinor>0</VersionMinor>
          <Lcid>0</Lcid>
          <WrapperTool>tlbimp</WrapperTool>
          <Isolated>False</Isolated>
          <EmbedInteropTypes>True</EmbedInteropTypes>
     </COMReference>
    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 1:32 PM (GMT 0) on 5 Mar 2024]
Reply
  • Yes, the SDK created termbase works with image:

    Screenshot of Trados Studio showing the termbase entry interface with 'GERMAN' language selected, an 'Add Term' button, and fields for 'Note' and 'Image' with a placeholder image and RWS logo.

    You should try to reinstall MT.

    In .csproj should be a <COMReference Include="MultiTermIX"> section. Does it look like this?

    <COMReference Include="MultiTermIX">
          <Guid>{ 76DBA48C -DA18 -4FB2 - BD45 - 32752C5BD73E }</Guid>
          <VersionMajor>17</VersionMajor>
          <VersionMinor>0</VersionMinor>
          <Lcid>0</Lcid>
          <WrapperTool>tlbimp</WrapperTool>
          <Isolated>False</Isolated>
          <EmbedInteropTypes>True</EmbedInteropTypes>
     </COMReference>
    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 1:32 PM (GMT 0) on 5 Mar 2024]
Children