Running the CATPDMExtractEV5Batch Batch Process

 

The extraction of data from the VPDM can be automated by running the CATPDMExtractEV5Batch batch process. This batch is driven via a command line giving as input the root of the assembly on which the extraction will be done.
  1. To retrieve the help information:

    CATPDMExtractEV5Batch -help

  2. To run the extraction:

    CATPDMExtractEV5Batch [-prc RootPRCName] [-adddoc DocName.DocType] [-adddoc DocName.revision.DocType] [-completeWithDrawing] [-completeWithAnalysis] [ -completeWithImpactedBy level number|all_level]
    [-configHandler ConfigHandlerName]
    [-zoneFilter ZoneName] [-zoneClearance ClearanceValue] [-zoneMode FullyIn|FullyOut|PartlyIn|PartlyOut]
    [-attributeFilter AttributeName Operator Value]
    [-separator string]
    -out outputpath [-delete] [-srmload false] [-epexml outputXmlFile] [-report xmlReportFile]
    [-server xxx] [-role xxx] [-user xxx] [-pwd xxx]


 

Arguments

-help Help

-prc prcname : Name of the PRC to extract.
-adddoc  docname : Enables to add to the session documents that are not attached to the assembly expanded from the PRC. Can be also used to extract standalone documents. Several adddoc statements are possible.
-completeWithDrawing:  Automatically extracts the CATDrawing documents that are relying on all design data (i.e. CATProduct, CATPart and model) loaded in the current session.
-completeWithAnalysis:  Automatically extracts the CATAnalysis documents that are relying on all design data (i.e. CATProduct, CATPart and model) loaded in the current session.
-completeWithImpactedBy [level number | all_level] Automatically extracts documents that have a ref-ref link to documents loaded in the current session. You may specify the level of links to automatically extract or specify that all levels of links be automatically extracted.  If a level is not specified, the level will default to one. 
 -configHandler CfgHandlerName: used to specify the ID of a configuration handler (already defined in ENOVIA V5 VPM) to be used to filter the structure to be extracted from ENOVIA V5 VPM.  CfgHandlerName is the identifier of the configuration handler.  This option may be specified at most one time in one command.
-zoneClearance ClearanceInMillimeters: sets the clearance (in millimeters) to be used in a volume filter on the structure to be extracted from ENOVIA V5 VPM.  This option may be specified at most one time in one command.
-zoneMode FilteringMode: sets the volume filter mode to be used in a zone filter on the structure to be extracted from ENOVIA V5 VPM.  Values can be FullyIn, FullyOut,PartlyIn and PartlyOut. PartlyIn is the default value.  This option may be specified at most one time in one command.
-zoneFilter ZoneName: zoneName is the identifier of a single zone (already defined in ENOVIA V5 VPM) to be used in a zone filter on the structure to be extracted from ENOVIA V5 VPM. This option may be specified more than once in one command.
-attributeFilter AttributeName Operator Value: used to specify the criteria to be used in an attribute filter applied to the  ENOVIA V5 VPM product structure to be extracted. attName is the identifier of an attribute of an instance or part reference. attOperator  is the operator to be used in the filter predicate. attValue  is the attribute value to be used. This option may be specified more than once in one command.  attOperator can have the following values: LIKE, EQ (=), NOTLIKE, NOTEQ (!=), GT ( >), GTEQ (>=), LT (<), LTEQ (<=).

-separator  string: used to specify a string to be used as a delimiter for the -prc and -adddoc keywords (instead of the default delimiter, ".").
-out outpath : Path of the folder in which the session will be saved.

-delete : Force deletion  for files already existing in output folder before extraction.
-srmload :To activate or not the option "SRM extraction" when loading documents. Default value is true.
-epexml : To generate an XML template file that can be used by reconciliation batch.
-report : To generate an XML report listing extracted documents.
  -server xxx : Server name.
-role xxx : Role used for ENOVIA V5 VPM connection.
-user xxx : User for ENOVIA V5 VPM connection.
-pwd xxx : User password for database connection.
 

Note that:

1. -prc is optional.

2. -adddoc is optional, the value expected is the value of the V_ID attribute plus the extension of the document separated by a dot.

3. More than one ENOVIA V5 VPM document can be added to the session: each document can be added by a -adddoc statement.

4. Documents are extracted to path given by -out argument. If documents already exist with the same name the extraction will failed.

5. About traces: the batch will run in background due to infrastructure limitations (see Part3 limitations list). To retrieve the batch traces, you should use environment variable CNEXTOUTPUT.

 

Examples

When running batches, you must always:

  • use the command catstart
  • the catstart environment (option -env) to be used is the same as the environment used with VPM Navigator.

For more details, see the Infrastructure Guide, Basic Tasks, Starting a Session on Windows.

set CNEXTOUTPUT=E:\tmp\trace.txt
catstart -run "CATPDMExtractEV5Batch -adddoc RECV5_EXTRACT1_PART1.CATPart -out c:\temp\ "

  1. Extraction of a single Part:

    CATPDMExtractEV5Batch -adddoc RECV5_EXTRACT1_PART1.CATPart -out c:\temp\
     
  2. Extraction of two CATParts and CATDrawing based these CATParts:

    CATPDMExtractEV5Batch -adddoc RECV5_EXTRACT2_PART1.CATPart -adddoc RECV5_EXTRACT2_PART2.CATPart -adddoc RECV5_EXTRACT2_drawing.CATDrawing -out c:\temp\
     
  3. Extraction of an assembly:

    CATPDMExtractEV5Batch -prc RECV5_EXTRACT3rootprc -out c:\temp\
     
  4. Extraction of an assembly drawing with its assembly:

    CATPDMExtractEV5Batch -prc RECV5_EXTRACT4rootprc -adddoc RECV5_EXTRACT4_drawing.CATDrawing -out c:\temp\

    OR

    CATPDMExtractEV5Batch -prc RECV5_EXTRACT4rootprc -completeWithDrawing -out c:\temp\

     
  5. BlackBox assembly (CATProduct):

    For CATProduct RECV5_EXTRACT4rootproduct.CATProduct containing two CATParts, RECV5_EXTRACT4_PART1.CATPart and RECV5_EXTRACT4_PART2.CATPart:

    CATPDMExtractEV5Batch -adddoc RECV5_EXTRACT4rootproduct.CATProduct -adddoc RECV5_EXTRACT4_PART1.CATPart -adddoc RECV5_EXTRACT4_PART2.CATPart -out c:\temp\
     
  6. Extraction of a single Part given its revision (--A):

    CATPDMExtractEV5Batch -adddoc RECV5_EXTRACT1_PART1.--A.CATPart -out c:\temp
     
  7. Extraction of linked CATParts:
    Three CATParts:  RECV5_EXTRACT_PART1.CATPart,RECV5_EXTRACT_PART2.CATPart,RECV5_EXTRACT_PART3.CATPart.
    RECV5_EXTRACT_PART3.CATPart is linked (with copy/paste with link) to RECV5_EXTRACT_PART2.CATPart.
    RECV5_EXTRACT_PART2.CATPart is linked (with copy/paste with link) to RECV5_EXTRACT_PART1.CATPart.

    To extract all three CATParts
    CATPDMExtractEV5Batch -adddoc RECV5_EXTRACT_PART1.CATPart -adddoc RECV5_EXTRACT_PART2.CATPart -adddoc RECV5_EXTRACT_PART3.CATPart-out c:\temp

    OR

    CATPDMExtractEV5Batch -adddoc RECV5_EXTRACT_PART3.CATPart -completeWithImpactedBy all_level -out c:\temp\

    Note:  to extract only one level (i.e. only RECV5_EXTRACT_PART3.CATPart and RECV5_EXTRACT_PART2.CATPart) -completeWithImpactedBy  would replace -completeWithImpactedBy all_level (in this case, it is not necessary to specify the level, since the default is 1).
     
  8. Extraction of CATPart with Analysis files:
    RECV5_EXTRACT_PART1.CATPart, Analysis1.CATAnalysis, Analysis11.CATAnalysisComputations and Analysis12.CATAnalysisResults

    To extract the CATPart with all it's analysis documents
    CATPDMExtractEV5Batch -adddoc RECV5_EXTRACT_PART1.CATPart -adddoc Analysis1.CATAnalysis -adddoc Analysis11.CATAnalysisComputations -adddoc Analysis12.CATAnalysisResults -out c:\temp

    OR

    CATPDMExtractEV5Batch -adddoc RECV5_EXTRACT_PART1.CATPart -completeWithAnalysis -out c:\temp

     
  9. Extraction when configured data with a filter set is sent to supplier.
    This example will filter the ENOVIA V5 VPM structure with the configuration filter contained in the configuration handler, cfgHdlr1. 
    CATPDMExtractEV5Batch -prc RECV5_EXTRACT3rootprc -configHandler cfgHdlr1 
     
  10. Extraction when data with a volume filter set is sent to supplier.  Zone clearance of 1mm is set, zone mode is fully in, and 2 zones are set.
    CATPDMExtractEV5Batch -prc RECV5_EXTRACT3rootprc -zoneClearance 1 -zoneMode FullyIn -zoneFilter zoneX  -zoneFilter zoneY
     
  11. Extraction when data with an attribute filter set is sent to supplier. 
    CATPDMExtractEV5Batch -prc RECV5_EXTRACT3rootprc -attributeFilter V_status  EQ Approved


     

 

 

Limitations

  1. Impact graph:

    The session to extract is not completed with "impacted by" or "impacted on" documents.
     
  2. Getting traces:

    The batch is based on CATIA V5 ApplicationFrame infrastructure, therefore a CATIA V5 window may appear when running the batch.
    The batch therefore needs a running window manager.
    The batch runs as a background task and its traces are not displayed in the window from which it was started. Traces can be retrieved using CNEXTOUTPUT environment variable.
 

Diagnostics

Possible exit status values are:

  • 0: Successful completion.
  • 4: Failure due to one or more of the standalone documents (-adddoc documents).
  • 8: Failure due to any of the following:
  • Query failed
  • Load of PDM data failed
  • Save of loaded data failed
  • 202: Connection failed.