Exporting 3D XML Files Using a Batch in Command Line

CATBatchStarter enables you to run PLM Batch files directly from the command line without interaction in Batch Monitor application. This task shows you how to generate by code input parameters xml files for export batches.

Note: CATUTIL functionality also enables you to run PLM batch Files using the Batch Monitor. For more information about CATUTIL and CATBatchStarter, see Running Batches Using the Batch Monitor and Running the CATBatchStarter Utility in the Infrastructure User's Guide.

Setting the Run-time Variables

The following are a set of run-time variables that you need to define before calling the batch for generating input parameter xml for Export 3D XML:

  • XMLthruAPI_Export: This run-time variable directs the Export code to be independent of the User Interface interaction for creating the input parameter xml file.

    For example: set XMLthruAPI_Export=1

  • ExportFilePath: This runtime variable sets the value of the file path where the user wants to Export the 3D XML. This file path will consequently be appended in the input parameter xml file created.

    For example: set ExportFilePath=D:\

  • ExportFileName: This run-time variable sets the name of the 3D XML file to be exported. This file name will consequently be appended in the input parameter xml file created.

    For example: set ExportFileName=test.3dxml

  • ExportFileDescription: This run-time variable sets the extraction Date details. This description will consequently be appended in the input parameter xml file created.

    For example: set ExportFileDescription=text

    Note: There is no run-time variable assigned for 3DShape-Rep option. By default, this option is selected Yes.

Create Input XML Parameter File

You can define the objects to be exported by using Exposed CAA APIs to query from the database.

  1. Create a session using CAAAdpUtilities.

  2. Get the objects to be exported by using Exposed CAA APIs to query from the database. You can have your own way of finding the objects to be exported.

  3. Use Exposed CAA APIs CATPLMBatch to set the list of data to be processed by the batch applications and generate the xml file. While generating the xml file, the above mentioned variables would be used for filling up the appropriate values in the xml. Refer to the sample batches demonstrating the use of CATPLMBatch in CAADatalifecycle.edu. The name of the batch to be used for export functionality is Export 3D XML.

Run the Batch for Export

The following describes the command line for running the Export batch.

  • Run input parameter xml file as an input for CATBatchStarter

    For Example: CATBatchStarter -input e:\users\my_parameters.xml -output e:\users\output

Considerations

The following considerations should be taken into account:

  1. The export batch does not support multiple root objects.

  2. For generation of input parameter xml file, only Product and Representation types are supported as Search results.

Important: You will receive an error message if:
  • The input parameter xml for Export contains multiple root objects.
  • The file path given for exporting the 3D XML is invalid.
  • The input parameter xml file does not have Read permissions.