Batch operation

This task will show you how to filter CATProducts or CATParts into a CATPart with no specification.
Make sure the input CATProduct or CATPart exists.
If a memory error or a memory warning occurs, or if the input document is corrupted, the output part or product will be empty.
 

Filter CATParts

On Windows:

  1. Initialize the environment:
    install_root\code\bin\CATSTART -run cmd

  2. Run the program:
    install_root\code\bin\CATDECGenerateCATPartFromCATPart.exe
    where install_root is the name of your installation folder, which is by default:
    C:\Program Files\DassaultSystemes\B16\intel_a

On UNIX:

  1. Log on as catiauser.

  2. Enter the command:
    /usr/DassaultSystemes/B16/OS/code/command/catstart -run CATDECGenerateCATPartFromCATPart

 

Command syntax:

CATDECGenerateCATPartFromCATPArt [InputPart|-L PartsList] -o OutputFile [-h -trace [TraceFile] -prop -color -selectionset - layer -pub -annot –layout2DL]

where:

InputPart is the full path and name of the input CATPart.

-L enables to process a list of parts with the same options. The list of the parts to process is given in a .txt file. Each line of this .txt file give the complete name and path of a file to process. The names of the output files are obtained by adding a suffix -1, -2, ... to the name given with the option -o. This option loads CATIA only once. Its syntax is the same for CATDECGenerateCATProductFromCATProduct and CATDECGenerateCATParFromCATProduct

Example:

To process Part1.CATPart, Part2.CATPart, ... Partn.CATPart with the same option (-color):

  • Create a file Mylist.txt in the directory C:/Dir0/.../. This file looks like this:
    C:/Dirxx/Dirxy/Part1.CATPart
    C:/Diryy/Dirzz/Part2.CATPart
    C:/Diryy/Diruu/Partn.CATPart
    ...
    (the input parts may be in the same directory or in different directories)

  • launch the command
    CATDECGenerateCATPartFromCATPart -L C:/Dir0/..../Mylist.txt -o c:/Dir0/FilterPart.CATPart -trace C:/Rep0/Trace.txt -color
  • Output:
    Part1.CATPart is filtered to FilterPart_1.CATPart under c:/Dir0/
    Part2.CATPart is filtered to FilterPart_2.CATPart under c:/Dir0/
    Partn.CATPart is filtered to FilterPart_n.CATPart under c:/Dir0/

    All the output parts are placed in the directory given with the option -o  (c:/Dir0/).
    A suffix is added to the output name to avoid conflicts.

    Information are found in the trace file C:/Dir0/Trace.txt

    Note that the two following commands are equivalent:

    CATDECGenerateCATPartFromCATPart -L C:/Dir0/..../Mylist.txt -o c:/Dir0/FilterPart.CATPart -trace C:/Dir0/Trace.txt -color

    CATDECGenerateCATPartFromCATPart C:/Dir11/Dir21/......../Part1.CATPart C:/Dir21/Dir22/......./Part2.CATPart ... C:/Dirn1/Dirn2/......./Partn.CATPart -o c:/Dir0/Part.CATPart -trace C:/Dir0/Trace.txt -color

-o declares the output file (a CATPart with its full path).

additional options:

-h launches the help.

-trace creates a log file with output result.

-prop keeps part properties.

-color keeps  color and attributes on sub-elements.

-selectionset keeps  selection sets.

-layer keeps layers and filters definition.

-pub keeps publications.

-annot keeps  annotations.

layout2DL keeps data from 2D Layout for 3D Design.

Filter CATProducts to CATProduct

On Windows:

  1. Initialize the environment:
    install_root\code\bin\CATSTART -run cmd

  2. Run the program:
    install_root\code\bin\CATDECGenerateCATProductFromCATProduct.exe
    where install_root is the name of your installation folder, which is by default:
    C:\Program Files\DassaultSystemes\B16\intel_a

On UNIX:

  1. Log on as catiauser.

  2. Enter the command:
    /usr/DassaultSystemes/B16/OS/code/command/catstart -run CATDECGenerateCATProductFromCATProduct

Command syntax:

CATDECGenerateCATProductFromCATProduct [InputProduct|-L ProductList] -o OutputFile [-h -trace [TraceFile] -color  -prop -selectionset -layer -pub -annot -layout2DL - suffix]

where:

InputProduct is the full path and name of the input CATProduct.

-L enables to process a list of products. For more information, please refer to option -L in Filter CATParts.

-o declares the output file (a CATProduct with its full path).

additional options:

-h launches the help.

-trace creates a log file with output result.

-prop keeps the product properties of the CATParts.

-color keeps color and attributes on sub-elements of the CATParts.

-selectionset keeps selection sets of the CATParts.

-layer keeps layers and filters definition. 

-pub keeps publications of CATParts.

-annot keeps annotations of CATParts.

layout2DL keeps data from 2D Layout for 3D Design.

-suffix declares the suffix to add to part numbers and display names.

 

All the documents (CATProduct and CATParts) are stored in the folder given by the -o option. To avoid name conflicts, an automatic suffix (_1, _2,...) is added when needed.
 

Filter CATProducts to CATParts

On Windows:

  1. Initialize the environment:
    install_root\code\bin\CATSTART -run cmd

  2. Run the program:
    install_root\code\bin\CATDECGenerateCATPartFromCATProduct.exe
    where install_root is the name of your installation folder, which is by default:
    C:\Program Files\DassaultSystemes\B16\intel_a

On UNIX:

  1. Log on as catiauser.

  2. Enter the command:
    /usr/DassaultSystemes/B16/OS/code/command/catstart -run CATDECGenerateCATPartFromCATProduct

 

Command syntax:

CATDECGenerateCATParFromCATProduct [InputProduct|-L ProductList] -o OutputFile [-h -trace [TraceFile] -color -merge]

where:

InputProduct is the full path and name of the input CATProduct

-L enables to process a list of products. For more information, please refer to option -L in Filter CATParts.

-o declares the output file (a CATPart with its full path).

additional options:

-h launches the help.

-trace to a file with output result.

-color Keeps color.

-merge Merges all bodies of each CATPart in one body.