Importing 3D XML Files Using Batch in Command Line

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

Required baseline access roles: Author, Leader.

CATUTIL enables you to run PLM batch files using the Batch Monitor. For more information about CATUTIL and CATBatchStarter, see File Coexistence and Migration User's Guide: Running the Downward Compatibility Batch

  1. Set the run time variables
    Define following run time variables for generating input parameters xml during import:
    Run-time Variable Description
    XMLthruAPI Creates input parameters xml file without interacting with the user interface

    For example: set XMLthruAPI=1

    ImportFilePathLocation where the 3D XML file is available for import

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

    For example: set ImportFilePath=D:\

    ImportFileName Name of a 3D XML file to be imported

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

    For example: set ImportFileName=test.3dxml

    ImportFileDescription Extraction details

    This description gets appended to the input parameters xml file.

    For example: set ImportFileDescription=text

    ImportModeOptions used for import such as Import "as New" or Import "as Reference"

    If the option is Import as New, the value is set as one else for Import as Reference, it is set as zero.

    For example: set ImportMode =1

    ImportPrefixPrefix used for Import "as New" option

    This prefix value is appended to the input parameters xml file.

    For example: set ImportPrefix=Copy Of

    ImportEnvironmentIDEnvironment for import

    For example: set ImportEnvironmentID=Engineering_Hub

    ImportExchangeModeMode of data exchange for import

    For example:

    • set ImportExchangeMode= FileExchanges
    • set ImportExchangeMode= ProjectSpace
    • set ImportExchangeMode= TeamWorkspace
    ImportProjectSpaceNameName of a project space where the 3D XML file is imported

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

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

    For example: set ImportProjectSpaceName=PS001

    ImportTeamWorkSpaceNameName of a team workspace where the 3D XML file is imported

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

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

    For example: set ImportTeamWorkSpaceName=PS001

  2. Run CAAAdpUtilities to create a customized batch.
  3. Run the customized batch to obtain a list of queried objects that needs to import in 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:

    Import3DXML_API_test M1 evaaix1plb:6750 user **pwd** VPMDESIGNER.VPM.DEFAULT -license D:\\CAADLCLicenseFileForPLMBatch.txt -ParamXMLFilePath e:\users\my_parameters.xml

    Where

    M1= repository name

    evaaix1plb:6750 = server name and port number

    xyz=user name

    **pwd** = password

    VPMDESIGNER.VPM.DEFAULT = credentials

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

    -ParamXMLFilePath e:\users\my_parameters.xml = paramxml file name and path

  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 import 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 importing 3D XML file is invalid.
    • The file path does not have Read permission.