|
The following are the different parameters
you need to define when accessing data in a PDM database using the batch
processes CATDMUUtility, CATDMUUtility2D and CATDMUBuilder.
Common Parameters
Accessing an ENOVIAVPM
Database in Connect Mode
Accessing an ENOVIAVPM
Database in Server Mode
Accessing an ENOVIA V5 VPM Database
Accessing a SMARTEAM Database |
|
Common Parameters
-db : Input database type: { VPM | VPMServer | ENOVIAV5 |
TeamPDM } : For processing data stored in a PDM database.
The type of the database must follow the -db option:
- VPM for ENOVIAVPM database in connect mode
- VPMServer for ENOVIAVPM database in server
mode
- ENOVIAV5 for ENOVIA V5 VPM database
- TeamPDM for SMARTEAM database
-user : user name identifier for a
database connection. Only used with the -db option. If no user or a
blanc is required, the option must not be used.
-pwd : password of the user for a
database connection. Only used with the -db option. If no user or a
blank password is required, the option must not be used. Not used with -spwd
option.
-spwd cryppwd : Enables user to specify an encrypted
password when connecting to a database. Only used with the -db
option. Not used with -pwd option. See
Encrypting a Password for
Accessing Data in a PDM Database.
-server srv : logical name of the database
server (defined in settings). Only used with the -db option. Its use
is mandatory to establish the connection with the database.
|
|
Accessing an ENOVIAVPM
Database in Connect Mode
Connect access mode is applicable for CATDMUUtility, CATDMUUtility2D and
CATDMUBuilder.
In connect access mode, you can access documents saved in ENOVIAVPM
, e.g. models and CATParts.
-db VPM : To define the ENOVIAVPM
database. The value must be VPM.
Command line examples:
CATDMUUtility -db VPM -server srv -user usr -spwd ***
CATDMUUtility -db VPM -user $user_db -pwd $pwd_db -server $server_name -coid $coid_nb -compid $compid_nb -cattab $table_name -catenv $env_name
-cgr (if you want to tessellate into cgr) $output_file_path
or -cache (if you want the
outputfile into the cache)
|
|
Note: If -server option exists without
corresponding parameter, VPM is assumed. |
|
The following is the form of a VPM UID to be
used for the CATDMUUtility2d batch: UID/Classic+VPM1/VPMENV/CATCON++#VPMENV++#DOCUMENT++++
++++#414198927EC21390#414198927EC21391.dxf
You can see:
- the VPM environment name (VPMENV)
- the table in which documents are stored (DOCUMENT)
- the document COID and COMPID
- the document extension
Windows example for CATDMUUtility2D:
catstart -run "CATDMUUtility2D -id UID/Classic+VPM1/VPMENV/CATCON++#VPMENV++#DOCUMENT++++
++++#414198927EC21390#414198927EC21391.dxf
-cgm E:\tmp\dxf.cgm -db VPM -user vpmadm15 -pwd vpmadm15 -server bubk1dsy"
-direnv C:\Documents and Settings\ctt\Application Data\DassaultSystemes\CATEnv
-env LocalEnvR13.txt
UNIX example for CATDMUUtility:
catstart -run "CATDMUUtility -db VPM -coid 414198927EC21390 -compid
414198927EC21391 -cattab CATIA_MODEL -catenv VPMENV -user vpmadm15 -pwd
vpmadm15 -server bubk1dsy -cgr -cache" -direnv /home/data/CATEnv -env
LocalEnvR13 |
|
Accessing an ENOVIAVPM
Database in Server Mode
Server access mode is applicable for CATDMUBuilder only.
In server access mode, you can access meta-data (e.g. Product Structure
data .psn and .CATVpm documents) in addition to documents accessible in
connect access mode.
-db VPMServer : To define the ENOVIAVPM
database. The value must be VPMServer.
-role role : To define the ENOVIAVPM
role.
If a VPM organization is needed, it has to be declared with the role using
the following syntax -role myrole[myorg]. Important: There
should not be any spaces between the role value and the organization value.
|
|
-host host_machine : to
define the UNIX server on which a ENOVIAVPM server
will be launched, thereby enabling access to a UNIX ENOVIAVPM
from a Windows machine. This option is only used when the CATDMUBuilder
batch job is launched from a Windows machine. |
|
Command line examples: -db VPMServer
-server srv -user usr -spwd *** -role xxx
-db VPMServer -server srv -user usr -spwd *** -role xxx -host yyy
|
|
Configuring the ENOVIAVPM Server to enable the
Windows client access in Server Mode
It is necessary that your ENOVIAVPM Administrator
do the following in order that you can access the ENOVIAVPM
database:
Pre-requisites
The client machine must be configured as if it was a standard machine
used for 3d com / DMU interoperability through either db2 client
or oracle client; it means that the user on Windows is able to
load data from ENOVIAVPM into DMU through 3d
com i.e. by using the CATIA V5 / Load menu from 3d Com.
Environment setup
On the Windows client
-
De-activate the variable CATIAV5_PORTALVPM=1
(used for interoperability between 3d com / ENOVIAVPM
/ DMU) and replace it by: CV5_VPM_XCONT=1
.
-
The variable HTTP_SERVER=the_server_name must
be kept.
-
A dedicated communication port must be declared:
- Edit the file : C:\WINNT\system32\drivers\etc\services
- Add the line : catcom 3001/tcp
Note that the port number can be changed.
On the UNIX server
-
A dedicated communication port must be declared:
- Edit the file /etc/services
- Add the same previous line (the same line as you added for
the dedicated communication port on the Windows client).
Note that the port number must be the same.
-
On the UNIX server, log as ENOVIAVPM
administrator.
-
Find on your ENOVIAVPM installation
the location of the JS0TLN module
(it is used for communication between the client and server), e.g.
/V15/cfgPTF15/code/steplib/JS0TLN .
-
Type JS0TLN .
Under the root user account perform the following modifications:
-
cp /V15/cfgPTF15/code/steplib/JS0TLN /My_directory/JS0TLN
-
chmod ug+s /My_directory/JS0TLN
-
To check the modification: ls -al /My_directory/JS0TLN
-r-sr-sr-x 1 root system
On the UNIX server:
-
Edit the file /etc/inetd.conf
-
Add the line catcom stream tcp nowait nobody /My_directory/JS0TLN
JS0TLN
-secured /My_directory/MySecurity.txt
where MySecurity.txt is a text file describing the security management
(see the syntax below)
Note that the modification inside /etc/inetd.conf file is not
dynamically taken into account; to make it active:
-
ps -ef | grep inetd
-
kill -1 xxxx
Security management on the UNIX server
Access is controlled by the file MySecurity.txt .
Here are the different parameters you can use in this file:
Keyword Meanings
- LogFile: Log file
- Log: All Log of all JS0TLN activities
- HostAddr: IP address of the Windows client
- RemoteUser: Logon used on the client side
- Local User: Logon used on the server side (one client per line)
Example 1:
HostAddr='128.3.123.123'
All users logged on this client will be authorized to launch the
batch.
Example 2:
HostAddr='128.3.123.123' RemoteUser='HHH' LocalUser ='vpmadm'
Access is authorized for user HHH, from only one machine and the user
HHH is mapped as vpmadm on the server
Example 3:
RemoteUser='HHH' LocalUser ='vpmadm'
Access is authorized for user HHH, from any client, mapped as vpmadm
on the server.
Tip: since the Windows user will try to execute the ENOVIAVPM
shell StartVPMBatchFromV5Batch.sh, it is recommended to map the
Windows user as an ENOVIAVPM user.
Final Considerations
-
The CATDMUBuilder launched from Windows will try to
execute on the server side an ENOVIAVPM shell
called StartVPMBatchFromV5Batch.sh (shell name must not be
changed).
This shell must be in the $PATH variable of the ENOVIAVPM
user declared in the mapping (Ex: /V15/vpmadm/code/bin)
-
In addition, the client needs to know the location of
this shell on the server. This is done through an environment variable
which has to be declared on the client machine:
set CV5VpmStart=/V15/vpmadm/code/bin
-
The StartVPMBatchFromV5Batch.sh shell has to
be created by the ENOVIAVPM administrator and can
look as follows:
!# /bin/ksh
if [ -f $HOME/.profile ] ; then
. $HOME/.profile
fi
. /V15/vpmadm/env/VPMWsUser.sh >/tmp/traces 2>&1
export GlobalVPMServer=1
VX0SERV >>/tmp/traces 2>&1
WARNING: When launching the CATDMUBuilder batch job from a Windows
machine, it is imperative to export the variable GlobalVPMServer=1
before launching the VX0SERV process.
-
The following are examples of a CATDMUBuilder used in
server mode for treating a CATVpm file:
Windows:
catstart -direnv C:\Documents
and Settings\ctt\Application
Data\
Dassault Systemes\CATEnv
-env LocalEnvR15.txt -run "CATDMUBuilder
E:\tmp\CATVPM
-db VPMServer -user vpmadm -spwd vpmadm -server server_name -role
VPMADMIN -host antonydsy -product E:\tmp"
where E:\tmp\CATVPM
is a directory containing the CATVpm file to be treated and where
server_name is the name of the server defined in the
ENOVIAVPM interoperability settings (Tools ->
Options -> Infrastructure -> Product Structure -> ENOVIAVPM
tab -> click Database Administration icon).
UNIX:
catstart.sh -direnv /CATEnv -env CATIA.V5R15.B15.txt -run
"CATDMUBuilder
/tmp/CATVPM -db VPMServer -user vpmadm -spwd vpmadm -server
server_name -role VPMADMIN -product /tmp"
where /tmp/CATVPM is a directory containing the CATVpm file to
be treated and where server_name is the name of the
server defined in the ENOVIAVPM
interoperability settings (Tools -> Options -> Infrastructure ->
Product Structure -> ENOVIAVPM tab -> click
Database Administration icon).
-
The following are examples of a CATDMUBuilder used in
connected mode for treating a CATProduct:
Windows:
catstart -direnv C:\Documents
and Settings\ctt\Application
Data\
Dassault Systemes\CATEnv
-env LocalEnvR15.txt -run "CATDMUBuilder
E:\tmp\CATProduct_directory
-db VPM -user vpmadm -spwd vpmadm -server server_name -force
-product E:\tmp"
where E:\tmp\CATProduct_directory
is a directory containing the CATProduct to be treated and where
server_name is the name of the server defined in the
ENOVIAVPM interoperability settings (Tools ->
Options -> Infrastructure -> Product Structure -> ENOVIAVPM
tab -> click Database Administration icon).
UNIX:
catstart.sh -direnv /CATEnv -env CATIA.V5R15.B15.txt -run
"CATDMUBuilder
/tmp/CATProduct_directory -db VPM -user vpmadm -spwd vpmadm -server
server_name -force -product /tmp"
where /tmp/CATProduct_directory is a directory
containing the CATProduct to be treated and where server_name
is the name of the server defined in the ENOVIAVPM
interoperability settings (Tools -> Options -> Infrastructure ->
Product Structure -> ENOVIAVPM tab -> click
Database Administration icon).
|
|
When using server mode to access an ENOVIAVPM
database, DMU needs to know the attributes of the ENOVIAVPM objects. This
is done by adding the variable GLOBAL_$ATTRIBUTES_TO_LOAD in the
VPM profile, e.g.
ASSIGN 'SELECT S_PART_NUMBER, S_CHG_NUM, S_TYPE, PART_DESCRIPTION,
C_PART_VERSION, C_MATURITY FROM PART_LIST; SELECT C_NICKNAME, S_TYPE_REP,
MODEL_DESCRIPTION, C_REVISION, C_MATURITY FROM CATIA_MODEL; SELECT
C_NICKNAME, S_TYPE_REP, S_PLOT_NAME FROM CATIA_PLOT; SELECT S_FORMAT,
S_NAME, D_PATH, C_REVISION, C_MATURITY, S_TYPE_REP FROM DOCUMENT' TO "GLOBAL_$ATTRIBUTES_TO_LOAD";
|
|
Accessing an ENOVIA V5 VPM Database
-db ENOVIAV5 : To define the ENOVIA V5 VPM database.
-role role : To define the ENOVIA V5 VPM user role.
-serverid id : Enables access via an existing
connection, as opposed to launching a server. (This method is faster, as
the time spent waiting for the server to be launched is by-passed.)
The access method depends on the existence of a connection to database:
- Connection does not exist: you must launch a server. The command line
is:
-db ENOVIAV5 -server srv:port -user usr -spwd *** -role xxx
- Connection exists: you can reuse the server. The command line is:
-db ENOVIAV5 -server srv -serverid xxx
To generate a Universal ID, see Generating a
Universal ID. Command line example:
CATDMUUtility -db ENOVIAV5 -server srv:port -user username -spwd
password -role role -id UID/ENOVIA/default/Universal_ID_of_the_data
(generated with UniversalIDGenerator function) -cgr (if you
want to tessellate into a cgr) $output_file_path or -cache (if
you want the outputfile to be placed in the cache)
|
|
Accessing a SMARTEAM Database
db TeamPDM : To define the SMARTEAM database.
-serverid id : There is no server capability
associated with SMARTEAM, however the utility expects this parameter, so
you must specify -server none.
The command line is:
-db TeamPDM -server none -user usr -spwd ***
To generate a Universal ID, see Generating a
Universal ID. |
|