|
Arguments
Connection Information
-connect xxx : Server name.
-role xxx : Role used for ENOVIAVPM
connection.
-user xxx : User for ENOVIAVPM
connection.
-pwd xxx : User password for ENOVIAVPM
connection.
General
Information
-help Help
-part : Environment and PartList name of the root of the assembly
to extract. Note that if you are extracting a single part, -adddoc
should be used to specify the document directly. If you use -part,
nothing will be extracted because the documents attached directly to the
root part are not extracted.
-adddoc : Environment, document table, document name and
document type to load if not attached in an assembly. Can be used also
to extract standalone documents. Several adddoc statements are possible.
-separator string: used to specify a
string to be used as a delimiter for the -part 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.
-epexml : To generate an XML template file that can be used by
reconciliation batch.
-report : To generate an XML report listing extracted documents.
-namingRules:
Define the XML file in which renaming rules are defined. Those rules use
predicates on VPMD attributes of the Part or the document. Rules
priority is mapped on rules order inside the XML files(Only the first
rule encountered with predicate set to true will be used)
Note that:
-
The -part and -adddoc options are optional.
-
More than one ENOVIAVPM document can be added
to the session: each document can be added by an -adddoc statement.
-
Documents are extracted to path given by -out argument. If
documents already exist with the same name the extraction will fail.
-
When using the -part option, in order to specify the version of
the PartList to be extracted, the attribute PART_LIST.C_PART_VERSION
must be defined in the ENOVIA VPM V4's RESULT mask. If the correct
version is not being extracted, please see your System Administrator to
verify this attribute is defined.
Declaration of naming rule convention for Extract:
Declaration is done in
an XML file that contains a list of Naming Extract Rules. Each rule is
made of one condition and one naming operator. If the condition is
verified, the naming operator will be used to generate the file name used
when saving the file to disk.
Condition
is made of a series of Predicates and each predicate is defined by an
attribute id, a comparison operator and a
value. The attribute can be selected from VPDM
attributes or internal attributes of the document,
or from the root product of this document for a CATPart or
a CATProduct. Internal attributes are standard attributes
such as document type, Part or document name or it could be specific to
the VPDM system; for instance for ENOVIAVPM,
we can access an environment or a table. The attribute of a Root Product of
CATPart or CATProduct, has an attribute id
that starts with the string “Part.”.
Naming Operator
is a series of string elements that will be concatenated to define the
name of the file. You do not have to add the file extension it
will be automatically done by the program.
<NamingRule>
<ExtractRule
id="CATProduct_name">
<Condition>
<Predicate type=“internal”
id=“Type”
operator=“=”
value=“CATProduct”/>
<Predicate type=“internal”
id=“StorageMode”
operator="="
value=“STRUCTURE_EXPOSED”/>
</Condition>
<NamingOperator>
<Element type=“internal”
id=“VPM.Environment"
length=“8“
padding=“
”/>
<Element type=“VPDM”
id=“Part.
Part Number” />
<Element type=“string”
id=“_"
/>
<Element type=“VPDM”
id=“Part.
Part Version” />
</NamingOperator>
</ExtractRule>
<ExtractRule Name=“R2”>
…
</ExtractRule>
<NamingRule>
Example of XML naming rule file
For ENOVIA VPM V4:NamingRuleForVPM.xml
For ENOVIA V5 VPM: NamingRuleForEV5.xml
List
of xml node and attribute of XML naming file
|
XML Node |
Attribute |
Description |
|
NamingRule |
Root of the XML document |
|
ExtractRule |
Define a new Naming rule for EPE extraction utilities. <ExtractRule
Name=“R1”> |
|
Id |
Rule identifier. |
|
Condition |
Define the condition to activate an extraction rule. |
|
Predicate |
Define a predicate for a condition. |
|
type |
Define the type of attribute to test. Value could be:
internal or VPDM. |
|
id |
Identifier of the attribute to be tested. If Id is prefixed by
Part. The string attribute will be found on the
child Part (root product). |
|
operator |
Test operator, it could be: = or LIKE. |
|
value |
Value to be used for predicate evaluation. |
|
NamingOperator |
|
|
Element |
One element to be used to build a name by concatenation. |
|
type |
Defines the type of attribute to
test. Value could be:
String
Id is the string
value to be inserted in the name.
internal
Id is the name of
an internal attribute to be used.
VPDM Id
is the name of a VPDM attribute to be used. |
|
id |
Identifier of the attribute to be used. If Id is prefixed by
Part. String attribute will be found on child Part
(root product). |
|
length |
Number of characters to be
inserted.
If the string is too small, we will pad
with padding characters, if defined. Otherwise length is only
considered as a maximal length of the string to be concatenated.
If the string is too large only the length
first characters will be used. |
|
padding |
Optional: Enables the use of a character string as
padding if attribute length is smaller than the value defined in
length. |
List
of internal attributes
|
Attribute |
Description |
|
General internal attributes |
|
Name |
Current identifier of the document or the part. |
|
Type |
File extension for document or Part. |
|
StorageMode |
PUBLICATION_EXPOSED or STRUCTURE_EXPOSED. |
|
Environment |
ENOVIA5 or VPM1. Indicates the environment:
ENOVIA V5 VPM or ENOVIAVPM. |
|
Internal attributes for ENOVIAVPM |
|
VPM.Environment |
ENOVIAVPM environment. |
|
VPM.Table |
ENOVIAVPM table. |
|
Internal attributes for ENOVIA VPM V5: |
|
EV5.Type |
Could be PRC, PV or DR.
PRC stands for Product
Root Class
PV stands for Part
Version
DR stands for Document
Revision |
|
|
Examples
When running batches, you must always use the command catstart,
of which the following is an example (for more details, see the
Infrastructure Guide, Basic Tasks, Starting a Session on Windows):
catstart -run "CATPDMExtractEV4Batch -adddoc
RECV5_EXTRACT1_PART1.CATPart -out c:\temp\ "
Extraction of a single Part:
CATPDMExtractEV4Batch -adddoc VPMENV1.DOCUMENT.RecVpmV4TestPart1.CATPart
-out c:\temp\
Extraction of two CATParts and CATDrawing based these CATParts:
CATPDMExtractEV4Batch -adddoc VPMENV1.DOCUMENT.RecVpmV4TestPart1.CATPart
-adddoc VPMENV1.DOCUMENT.RecVpmV4TestPart2.CATPart -adddoc
VPMENV1.DOCUMENT.RecVpmV4TestDrw.CATDrawing -out c:\temp\
Extraction of an assembly:
CATPDMExtractEV4Batch -part VPMENV1.PART_LIST.RecVpmV4Root -out c:\temp\
Extraction of an assembly drawing with its assembly:
CATPDMExtractEV4Batch -part VPMENV1.PART_LIST.RecVpmV4Root -adddoc
VPMENV1.DOCUMENT.RecVpmV4TestDrw.CATDrawing -out c:\temp\
BlackBox assembly (CATProduct):
CATPDMExtractEV4Batch -adddoc
VPMENV1.DOCUMENT.RecVpmV4BlackBox.CATProduct -out
c:\temp\
Managing the file name
after Extraction can be done by using:
CATPDMExtractEV4Batch -part VPMENV.PART_LIST.GEAR.CATProduct -out
/u/users/xxx/GEAR/extract1 -delete -namingRules "/u/users/xxx/namingrules.xml"
-connect SAMPLE -role VPMADMIN.ADMIN.DEFAULT -user xxx -pwd xxx
-
|