3 Replies Latest reply: May 15, 2014 10:15 AM by elginreigner _ RSS

    Monarch Pro command line parameters

    sarsena _

      I have a script that currently executes a monarch model to parse pdfs into a csv.  I was wondering if there was a way to change the delimiter to a semi-colon for instance instead of a default comma in the parameters or another way.  I did noticed in the properties you can change this but that only works if I manually export the project it will use the specified delimiter.  Any help on this would be great. 

       

      Thanks!

        • Monarch Pro command line parameters
          Olly Bond

          Hello Sarsena,

           

          If you save the model and project after editing the Export options, then the change should work.

           

          Best wishes,

           

          Olly

            • Monarch Pro command line parameters
              sarsena _

              Hi Olly thanks for the response.  I did in fact try that and I still am getting a comma instead of a semi colon when I run my script.  The command in my script looks like this:

               

              $command_suffix = ' /mod:C:\new_conf_exports\models\whole_confirm.xmod /exp:C:\new_conf_exports\autoconf.csv /expfileopt:append /T';

              $monarch_path = '"C:\Program Files (x86)\Datawatch\Monarch\Program\monarch.exe"';

               

              // First, write all of the reports to process to the command to execute.

              for ($i=0; $i < count($files_written); $i++) {

                $monarch_path = $monarch_path.' /rpt:C:\new_conf_exports\confirmations
              '.$files_written[$i];

                if ($i % 10 == 0) {             // Execute the Monarch run every 10 reports to make sure the command string doesn't get too long.

                  $monarch_path = $monarch_path.$command_suffix;      // Run Monarch to extract data from the PDF files I downloaded.

                  echo exec($monarch_path);

                  $command_suffix = ' /mod:C:\new_conf_exports\models\whole_confirm.xmod /exp:C:\new_conf_exports\autoconf.csv /expfileopt:append /T';

                  $monarch_path = '"C:\Program Files (x86)\Datawatch\Monarch\Program\monarch.exe"';

                }

              }

               

              Could it possibly be that I am exporting it as a .csv?  If that may be the issue is there a way to use a semi colon?