How to call plugin from VB application

Is there a way to call the LegacyConverter plugin from the VB application? I appreciate it if you have sample code.
However, it is not necessary to launch the LegacyConverter screen, and only the conversion function of sdlxliff → TTX and
TTX → sdlxliff (folder or file name specification) are necessary.

Parents
  • So your looking to use some of the components of the Legacy Converter from an external application you want to build in VB. For this you can do the following:

    1. Download the Legacy Converter from github (I think you already did this).

    2. Build the source code

    3. From your VB application add a reference to Sdl.Community.XliffReadWrite.dll and Sdl.Community.XliffToLegacyConverter.Core.dll

    4. Write your VB implementation by using the Legacy Converter. As example on how to use you can find here (in C#).

    Romulus Crisan | Translation Productivity Development Manager | SDL | (twitter) @cromica_82 | (blog) http://www.romuluscrisan.com/

  • I added specified reference setting and described the code. There is no compile error, but when executed, the following error was output.
    Is there a way to solve it?
    InnerException:
    HResult = -2146233088
    Message = No Application specific plug-in directory found.
    Source = Sdl.Core.PluginFramework
    StackTrace:
    at Sdl.Core.PluginFramework.DefaultPluginLocator..ctor()
    at Sdl.Core.PluginFramework.PluginManager.get_DefaultPluginRegistry()
    at Sdl.FileTypeSupport.Framework.Integration.PocoFilterManager.LoadAllDefaultFileTypeDefinitions()
    at Sdl.FileTypeSupport.Framework.Integration.PocoFilterManager..ctor(Boolean autoLoadFileTypes)
    InnerException:

    Coding (part) is as follows.
    Dim sdlXliffReader As Sdl.Community.XliffReadWrite.Processor = New Sdl.Community.XliffReadWrite.Processor
    Dim Converter As Processor = New Processor ()
    Dim filename As String = "C:\work\aaa.sdlxliff"

    Sdl.Community.XliffReadWrite.Processor.ProcessorSettings.FilePathOriginal = filename
    Sdl.Community.XliffReadWrite.Processor.ProcessorSettings.FilePathUpdated = String.Empty

    Dim fileParagraphUnits = sdlXliffReader.ReadFileParagraphUnits () ← Error occurred 
    Converter.WriteTtx (filename + ".ttx", Sdl.Community.XliffReadWrite.Processor.ProcessorSettings.FilePathOriginal,
      FileParagraphUnits, sdlXliffReader.SourceLanguageCultureInfo, sdlXliffReader.TargetLanguageCultureInfo)
Reply
  • I added specified reference setting and described the code. There is no compile error, but when executed, the following error was output.
    Is there a way to solve it?
    InnerException:
    HResult = -2146233088
    Message = No Application specific plug-in directory found.
    Source = Sdl.Core.PluginFramework
    StackTrace:
    at Sdl.Core.PluginFramework.DefaultPluginLocator..ctor()
    at Sdl.Core.PluginFramework.PluginManager.get_DefaultPluginRegistry()
    at Sdl.FileTypeSupport.Framework.Integration.PocoFilterManager.LoadAllDefaultFileTypeDefinitions()
    at Sdl.FileTypeSupport.Framework.Integration.PocoFilterManager..ctor(Boolean autoLoadFileTypes)
    InnerException:

    Coding (part) is as follows.
    Dim sdlXliffReader As Sdl.Community.XliffReadWrite.Processor = New Sdl.Community.XliffReadWrite.Processor
    Dim Converter As Processor = New Processor ()
    Dim filename As String = "C:\work\aaa.sdlxliff"

    Sdl.Community.XliffReadWrite.Processor.ProcessorSettings.FilePathOriginal = filename
    Sdl.Community.XliffReadWrite.Processor.ProcessorSettings.FilePathUpdated = String.Empty

    Dim fileParagraphUnits = sdlXliffReader.ReadFileParagraphUnits () ← Error occurred 
    Converter.WriteTtx (filename + ".ttx", Sdl.Community.XliffReadWrite.Processor.ProcessorSettings.FilePathOriginal,
      FileParagraphUnits, sdlXliffReader.SourceLanguageCultureInfo, sdlXliffReader.TargetLanguageCultureInfo)
Children
No Data