Imports data from a translation project from and for a single target language.

Syntax:

ExFcts.ImportFromProject(ProjFile As String, FromProjFile As String, 
         FromLang As String, ToLang As String, numData As ImportExportData,
         enumOption As ImportProjectOptions,  [HTMLReportFile As String],
         [showProgressDlg As Boolean = False]) As Boolean     
     
Return: Boolean. "True" if successful. Otherwise "False".
Parameters:
ProjFile: File name of the source project to exported from. File extension *.fsmdb. or *.rwtproject. The project must exist in the RC-WinTrans "Projects" tab view.

FromProj: File name of the project to import from. File extension *.fsmdb. or *.rwtproject.

FromLang: Language to import the data from (source language).
ToLang: Language to import the data for (target language).

enumData: Data to be imported. Type: enum "ImportExportData"

enumOption: Import options. Type: enum "ImportProjectOptions"

HTMLReportFile: File name of the HTML Report fle created while importing data.
                 Optional parameter (default: empty string ("")).

showProgressDlg: Open a progress dialog box while the import is running.
                 Optional parameter (default: False).

Example:

Example 1
---------
 bVal = RCWinTrans.ExFcts.ImportFromProject("c:\main.rwtproject", "c:\transl.rwtproject", "de", "de", \
                                iedata_text, ipoption_setrecheckmarker )

Example 2
---------
 bVal = Application.ExFcts.ImportFromProject("c:\main.project", "c:\transl.fsmdb", "de", "de", \
                                iedata_text + iedata_size, \
                                ipoption_createreport + ipoption_setrecheckmarker, \
                                "c:\impreport.htm", False)
Remarks:
Event "OnSetTargetText"
--------------------------------
When data are imported for an item then RC-WinTrans fires the event "OnSetTargetText". Catching this event can be used e.g. to monitor when a target text is imported and assigned. To catch an RC-WinTrans event requires to use an event handler class in the VBA project.

Example: Class Module to catch the RC-WinTrans ebent "OnSetTargetText"
--------------------------------------------------------------------------------------------
  Public WithEvents EventHandler As Application

  Private Sub Class_Initialize()
     Set EventHandler = Application
   End Sub

  Private Sub EventHandler_OnSetTargetText(ByVal TU As TransUnit)
     ' -> do something here
  End Sub

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

See also:

Class ExFcts | TranslationProject.ImportFromProject | Application.OnSetTargetText


Last Updated: 03/20/21