Skip to main content
Question

Programatically detecting the errors in the input file during the conversion

  • November 4, 2020
  • 0 replies
  • 3 views

We are converting files from KML/KMZ format to MapInfo in a batch operation. We have our C# program calling the FME as a console application with parameters, for every file. Everything works fine except sometimes the the KML input file has errors in it and the FME convertor exists with an error I can see in the console screen.

Is any way I can programmatically detect when the convertor has problems and skip the file from my side of the code? Is any message send back to the console in case of success or fail? 

It should be a correct way to get the result since I can see it in the console, i am just looking for the supported way.

Below is an example how we call the FME workflow:

string inputPath2 = "C:\\Users\\Breazuo\\Documents\\FME\\Workspaces\\ogckml2mapinfo.fmw" +
                    " --SourceDataset_OGCKML " + "\"" + path + "\"" +
                    " --DestDataset_MAPINFO " + "\"" + FMEOutputDirectory + "\"";
 System.Diagnostics.Process pProcess = new System.Diagnostics.Process();
 pProcess.StartInfo.FileName = FMEPath;
 pProcess.StartInfo.Arguments = inputPath2;
  pProcess.Start();
   pProcess.WaitForExit();
   pProcess.Close();

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.