ProcessExport needed?

Hi, in attempt to develop a tool to export MultiTerm into XML format, I'm little confused how ProcessExport() is needed.

The MultiTerm reference tells me that ProcessExport method carries out the actual export process, so naturally, I've had something similar to:

expDef.ProcessExport(MtTaskType.mtScript);

As far as with my limited attempt, just running ApplyExport for each entry seems to process the data normally.

The motivation for removing ProcessExport altogether is to get rid of this "LNG is missing!" error that seems to be plaguing for some termbase export process.

If anyone can enlighten me regarding how ProcessExport applies in the process as well as possible consequence of not having it, that would be very helpful.

Thank you!

Parents
  • Hi Hideki,
    When you want to export a termbase with Multiterm, you go to Termbase Management --> Export in the left pane and choose an export definition in the right pane. With a right click on it, you can among other functions 1. save the export definition in a xdx file, 2. Process the export

    What I do first is to save the xdx file from Multiterm in order to use it as a ressource in my programm.
    In the code, I add a new export definition based on this xdx file in the wanted termbase "structure" and process with ProcessExport

    This looks like this:
    string exportdefStr = createNewExportDefinition(xdxFile); //the function just puts the content of the xdxfile in a string
    ExportDefinition oExpDef = new ExportDefinition();
    oExpDef = oTb.ExportDefinitions.Add("myExportDef", "", exportdefStr);
    oExpDef.ProcessExport(MtTaskType.mtScript);

    Hope this helps too :)
    Kind regards
    Sébastien
  • Hello Sébastien
    Thank you for this information, it is very helpful to understand the process.

    I actually do have to parse each individual entries to apply customized filter, so I have something like following:

    for (int i = 0; i < count; i++)
    {
    Entry e = tbentries.Item(i);
    string export_staging = e.ApplyExport(expDef);
    if (export_staging != "" && checkDateCriteria(export_staging, exportFormat.DEFAULT))
    {
    // Do stuff here (replace, process, etc.)
    }
    }

    I was wondering doing the above in lieu of processing this through ProcessExport would produce any side effect.

    Thank you!
Reply Children