MultiTerm SDK: Importing Entries/Terms

Hello again,


I'm trying to find the information regarding importing entries/terms from an XML file into a termbase, using the MultiTerm SDK.

I've found ImportDefinitions, but does this only apply to the XDT definitions, rather than the XML termbase content?

Thanks in advance,

Samuel

Parents Reply
  • Hi Samuel,

    The reference to the XML file is part of the ImportDefinition object, I don't think you can programmatically change the content of it, so you'd have to manipulate XML or use the wizard.
    Maybe it helps if you go through the flow once in MultiTerm to see what a ImportDefinition holds.

    To execute you only need this:

    Applying this method to an import definition runs the import. It requires the task type as parameter, i.e. whether the import should be run in script mode (i.e. without the wizard) or using the import wizard. In addition you can provide the optional source/target index parameters. Note that import definitions can use the source/target index as logical fields.

    //select termbase
    Termbase oTb = oTbs["Termbase name"];

    //select an import definition
    ImportDefinitions oImpDefs = oTb.ImportDefinitions;
    ImportDefinition oExpDef = oImpDefs["Default import definition"];
    oImpDef.ProcessImport(Sdl.MultiTerm.TMO.Interop.MtTaskType.mtScript, "English", "German");


    Thanks,
    Luis

    Best regards,
    Luis Lopes | Principal Product Manager | RWS | (twitter) @Luis___Lopes |

Children