Exporting/Reporting Using a Batch

This task shows you how to work with a batch in order to generate all types of report files (report, flat report, export).
A batch V5 is a non-interactive program which is based on an xml file that includes a parameter File (containing its inputs and outputs).
No product needs to be open.
  1. Customize the parameter .xml file that will be used by the batch.
    We recommend that the first time you generate the default xml file by using the Batch monitor, please refer to Running Batches Using the Batch Monitor in the Infrastructure User's Guide for more information.
     

    An example of parameter xml file can be found in reffiles/AbfBatchParam (intel_a for Windows, aix_a for IBM UNIX, irix_a for SGI UNIX, solaris_a for SUN Unix, hpux_a for HP UNIX).

     

     
    This file is composed of two main parts:
    • Input Parameters
    • Output Parameters

    Input Parameters

    This part is itself divided into two main categories:
    • File Part: it includes:
      • the file id (called ''Product File'' and must not be modified by the user), and
      • the filepath (complete path of the product to be filled by the user)
    • Argument Part: it includes:
      • the Process Type (Export (Exp), Report (RepS), Flat Report (RepF)) and the output file name, then
      • all the export/report options.
    If an option is wrong, the report is generated with a warning (except for the Process Type)

    Output Parameters

    It contains the export/report output directory defined by the user:
    • folder id: called ''Output Directory'' (and must not be modified by the user)
    • folderpath: directory path of the product to be filled by the user
       
  2. Launch the CATBatch by specifying the customized parameter .xml file.
    Please refer to Running Batches Using the Batch Monitor in the Infrastructure User's Guide to know how launch the CATBatch command.
    As an example, on Windows, from a command window, go to the level in which CATIA is installed, and launch the following command:

    catstart -env LocalEnv -run "CATBatchStarter E:\tmp\ExportBatch\ExportInputParametersFile.xml -lic_setting"

A log file is open each time the batch command is launched. It is stored in the same directory as the BATCH_HOME variable.
This result file can either be a .txt or .html file.

 
  • If the product contains several sub-products, as many files as there are sub-products are generated. Each file name corresponds to a product name.
  • In case warnings are detected, a warning message is added to the existing log file: