V5/V4 File-based Migration Batch

This task shows you how to convert CATIA Version 5 documents into CATIA Version 4 from a command line (not with the interactive batch).

You can launch the V5 / V4 Batch from:

  • the PLMV4ToV5Migration Batch, for more information about PLMV4ToV5Migration, please refer to Running the PLMV4ToV5Migration Batch in the Infrastructure User's Guide.
  • the Command Line.

You can choose between 2 modes:

  • Non-Associative Save As Model: no link with the CATPart
  • Associative Save As Model: the part's path is kept in memory and you can re-synchronize the model after modifying the part. Each non-volumic and non-surfacic V4 element keeps a link with its equivalent in the CATPart in order to use its own data that allowed its construction.
Before launching the batch tool:
  • you have to make sure that your environment is correctly set up.
  • you must have the x Server installed on the machine on which you are executing the Batch. Then, you must enter the command: xhost+ (on UNIX) allowing you to get back the V5 colors.
On Windows and UNIX, you can launch the migration by entering the command:
  • CATV5ToV4 -if inputPart -of outputmodel [ -mod savingmode] [ -report ]
 

-if: The -if parameter is mandatory; this parameter can be either a CATPart path or a Text file path. If it is a CATPart, it specifies the document to be processed. The migration result is stored in the same directory of the part and it acquires the same name as the part's if you do not specify the -of parameter. For instance: -if Directory1/Part1.CATPart.
If it is a Text file, it should have the .txt extension and contain CATPart paths. For instance: -if xx.txt.
xx.txt should contain some things like:

Directory1/Part1.CATPart
Directory2/Part2.CATPart

-il: this option allows you to specify an enumeration of input CATPart paths. For instance:
-il  Directory1/Part1.CATPart Directory2/Part2.CATPart

-of: output directory parameter. This parameter can be either a model's path or a directory path. If it is a directory, the model will take the name of the Part.
For instance: CATV5ToV4 -if inputPart\Part1.CATPart -of outputPartDir
The generated model will be saved in outputPartDir\Part1.model.

-mod: saving mode, the value can be ASSO (for associative model creation or synchronization) or NO_ASSO for standard Save As Model. If this parameter is not valuated, it is read in the Associativity mode CATSetting (in the General category of the Options Tree, select Compatibility and click the Saving as V4 Data tab).

-report: output directory. If no report directory is specified, the report is stored in the standard process output directory: CATReport. Else the report file (.rpt) is stored under the specified directory.

When you are in Associative Mode, all these references (-if/-il, -of, -mod) must be specified.

 

Examples:

CATV5ToV4 -if inputPart -of outputdirectory:

Performs standard Save As model on input Part document and stores the resulting model named automatically in the output directory.

CATV5ToV4 -if inputText -of outputdirectory:

Performs standard Save As model on input Parts referenced in the inputText. They are stored in the output directory. For instance: -il Directory2/xx.txt.

CATV5ToV4 -if inputPart -of outputmodel:

Performs standard Save As Model on input Part and names the resulting model according to the -of option. For instance: -of Directory2/model1.model.

CATV5ToV4 -il inputPart1 inputPart2 -of outputmodel:

Performs standard Save As Model on input Parts and names the resulting models according to the -of option.

CATV5ToV4 -if inputPart -of outputmodel -mod ASSO:

Creates or synchronizes the associative model specified by the -of option. Note that the -of option is mandatory in this case.

For information, in these examples,

  • inputparts can be:

    • on UNIX: /u/Parts/Part1.CATPart

    • on Windows: E:\Parts\Part1.CATPart

  • outputdirectory can be:

    • on UNIX: /u/Models

    • on Windows: E:\Models

 

Settings:

V5 Settings are taken into account, more particularly Interoperability settings like Model Dimension, Model Unit or Initial Model.

For more information about the non-associative Save As Model operation, please refer to Saving a V5 Part As a V4 Model.