Exporting Data to 3D XML Files Using a Batch in Command Line

You can generate an xml file and input parameters by defining a set of run time variables enabling you to automate the export process. CATBatchStarter enables you to run PLM batch files directly from the command line without interacting with the Batch Monitor application.

Note: You cannot export 3DEXPERIENCE content with CAD master to 3D XML, except 3DEXPERIENCE content with CATIA V5 or Solidworks master. For more information, see Export of 3DEXPERIENCE Content with CATIA V5 Master to 3D XML and Exporting 3DEXPERIENCE Content with SOLIDWORKS Master to 3D XML.

Required baseline access roles: Author, Leader.

CATUTIL enables you to run PLM batch files using the Batch Monitor.

  1. Set the run time variables
    You can define following run time variables for generating the input parameters XML during export:
    Run-time Variable Description
    XMLthruAPI

    Creates input parameters xml file without interacting with the user interface.

    For example: set XMLthruAPI=1

    ExportFilePathPath where you can export the 3D XML file

    This file path gets appended to the input parameters xml file.

    For example: set ExportFilePath=D:\

    ExportFileNameName of a 3D XML file to be created

    This file name gets appended to the input parameters xml file.

    For example: set ExportFileName=test.3dxml

    ExportFileDescriptionExtraction details 

    This description gets appended to the input parameters xml file.

    For example: set ExportFileDescription=text

    Export3DShapeOptionSets whether the batch can process queried objects with or without considering the representations. When you set the variable to Yes, all the product components get exported with their 3DShape representations (if any) but not with the other representations. When you set the variable to No, the product components get exported without any representation (even if these objects have some representations.) This option gets appended to the input parameters xml file.

    For example: set Export3DShapeOption=Yes

    ExportFileFormatFormat of the 3D XML file used in batch mode

    You can modify the ExportFileFormat setting to 3DXMLAuthoring to generate a 3D XML file with the with authoring format or to 3DXMLReview to generate a 3D XML file with the for review format.

    For example: set ExportFileFormat=3DXMLReview

    ExportModeMode of data exchange used for export

    If the exchange mode is on the selected drive, the export mode is set as File Exchanges. Similarly, if the exchange mode is either in the Supplier or Team Central, the export mode is set as Project Space or Team Workspace respectively.

    For example:

    set ExportMode=FileExchanges

    set ExportMode=ProjectSpace

    set ExportMode=TeamWorkspace

    ExportProjectSpaceNameName of a project space where the 3D XML file is created

    This file is available in the Inbox folder in the specified project space.

    Note: For File Exchanges mode, the ExportProjectSpaceName is set as an empty string.

    For example: set ExportProjectSpaceName=PS001

    ExportTeamWorkSpaceNameName of a team workspace where the 3D XML file is created

    This file is available in the Inbox folder in the specified team workspace.

    Note: For File Exchanges mode, the ExportTeamWorkSpaceName is set as an empty string.

    For example: set ExportTeamWorkSpaceName=TWS001

  2. Run CAAAdpUtilities to create a customized batch.
  3. Run the customized batch to obtain a list of queried objects to be exported from the database.
  4. Create an input parameter xml file using the exposed CAA API, CATPLMBatch.

    This xml file contains detailed information about the queried objects and the appropriate values set for run time variables.

    The following is an example of a sample batch:

    Export3DXML_API_test PLM1 evaaix1plb:6750 xyz **pwd** VPMDESIGNER.VPM.DEFAULT Engineering_Hub PLMProductDS(NLSMigr) PLMRepresentationDS(NLSMigr) -license D:\\CAADLCLicenseFileForPLMBatch.txt -ParamXMLFilePath D:\\ inputParameterFile.xml PLM_ExternalID MyProduct

    Where

    PLM1= repository name

    evaaix1plb:6750 = server name and port number

    xyz=user name

    **pwd** = password

    VPMDESIGNER.VPM.DEFAULT = credentials

    Engineering_Hub = environment name

    PLMProductDS(NLSMigr) = customized PLMCoreReference

    PLMRepresentationDS(NLSMigr) = customized PLMCoreRepReference

    -license D:\\CAADLCLicenseFileForPLMBatch.txt = license name and path

    -ParamXMLFilePath D:\\ inputParameterFile.xml = paramxml file name and path

    PLM_ExternalID MyProduct = attribute and its value

  5. Run CATBatchStarter batch using the input parameters xml file as an input.

    The following is an example of the command used for running the export bath:

    CATBatchStarter -input e:\users\my_parameters.xml -output e:\users\output
    Warning: An error message appears in the following cases:
    • The file path provided for exporting 3D XML file is invalid.
    • The file path does not have Write permission.
    • The input parameters xml file for export contains multiple root objects if you are using the for review format.