Installation and Operations Guide > User Environment > 4.1 Environment Variables
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
4.1 Environment Variables
UNIX Environment Variables
The file site_setup, located in the installation directory, provides a central file for setting environment variables. The file is a standard Bourne shell script that is included in the Patran run shell when you execute Patran.
You can enter any standard Bourne shell command in this file. You can also set environment variables in this file using the setEnv command. The Patran startup script interprets this as the proper environment variable command for your current shell (i.e. Bourne or Korn shell). For example, to set the path for MSC Nastran 20xx to /msc/msc20xx/bin/nastran, add the following line to site_setup:
% setEnv MSCP_NASTRAN_CMD20xx /msc/msc20xx/bin/nastran
This is equivalent to setting the cshell variable:
% setenv MSCP_NASTRAN_CMD20xx /msc/msc20xx/bin/nastran
Available environment variables are listed in Table 4‑1. Note that some variables are specific to UNIX or to Windows. This is noted in the table.
Windows Environment Variables
Patran on Windows supports most of the same environment variables as the UNIX versions. To set environment variables, use Control Panel\System\Environment. You can use a DOS command line to define a variable or the site_setup.pm file.
Setting environment variables on the DOS command line uses the set command. The table lists examples in UNIX form (using setenv). For example the following UNIX command:
% setenv MSC_LICENSE_FILE /msc/msc_licensing/licenses/license.dat
is equivalent to the following set command in DOS:
> set MSC_LICENSE_FILE=%P3_HOME%\msc_licensing\licenses\license.dat
Environment variables are listed in Table 4‑1. Note that some variables are specific to UNIX or to Windows. Application variables are replaced on Windows by the p3_trans.ini file. See Analysis Preferences Setup, 14 for more information.
Site and User Setup Files
On Windows, the site_setup.pm and user_setup.pm files can be used to set environment variables and paths specifically for Patran. Site setup sets variables and paths at the Patran installation level. These changes affect all Patran users working with this installation. User setup sets variables and paths at the user account level. The files are read in this order:
1. site_setup.pm
2. user_setup.pm
Any variables or paths that are set in user_setup.pm will take priority over variables or paths set in site_setup.pm.
The site_setup.pm file can be used to set paths and environment variables for Patran at the installation level. An example of the syntax for the site_setup.pm is shown below:
setEnv('MSC_LICENSE_FILE','1700@bari,1700@banff');
The user_setup.pm file resides in your home directory and can be used to set environment variables for individual users. The settings in the user_setup.pm file override settings in the site_setup.pm file. The user_setup.pm file uses the same syntax as the site_setup.pm file.
Normally environment settings take higher priority than site_setup.pm and/or user_setup.pm. An overwrite flag can be used to overwrite an environment variable set at the system level. When used in site_setup.pm or user_setup.pm, the overwrite flag forces Patran to use the environment variable value that you have set even if it was previously defined by the system.
setEnv('MSC_LICENSE_FILE','1700@bari,1700@banff',’overwrite’);
If the overwrite flag is used in user_setup.pm and in site_setup.pm for the same variable or path, the setting in user_setup.pm will take priority.
 
Table 4‑1
Variable
OS
Purpose
MSCP_[app]_HOST <hostname>
or
MSCP_[app]_HOST[Version] <hostname>
UNIX
See Analysis Preferences Setup, 14 for Windows equivalent.
Sets the name of the host on which to execute the given application, [app]. The NASTRAN and MARC variables additionally allow the specification of a different host for each version.
For example, to set MSC Nastran Version 20xx to run on a machine called “alpha”:
setenv MSCP_NASTRAN_HOST20xx alpha
For a complete listing of application variables see the default site_setup file.
MSCP_[app]_CMD[vers] <command>
UNIX
See Analysis Preferences Setup, 14 for Windows equivalent.
Sets the command path for the application [app]. Some applications may allow Patran to call multiple versions.
For example, if MSC Nastran 20xx is located in /msc/bin/nast20xx on the host defined by MSCP_NASTRAN_HOST:
setenv MSCP_NASTRAN_CMD20xx /msc/bin/nast20xx
For a complete listing of application variables see the default site_setup file.
MSCP_[app]_SCRATCHDIR <dir>
UNIX
See Analysis Preferences Setup, 14 for Windows equivalent.
Sets the scratch directory for application, [app]. Default is /tmp. For example, to use /msc/tmp as scratch for MSC Nastran:
setenv MSCP_NASTRAN_SCRATCHDIR /msc/tmp
For a complete listing of application variables see the default site_setup file.
NASTRAN_VERSION <ver>
UNIX
See Analysis Preferences Setup, 14 for Windows equivalent.
Sets the default MSC Nastran version on the Preference translation parameters form.
MSCP_LOCAL_NASTRAN_CMD [vers] <command>
UNIX
Windows
Sets the path for the MSC.Flightloads spline verify, aero model import, and loads extraction executable. See Flightloads and Dynamics Setup, 43 for additional information.
MSCP_FLDS_MSG_FILE <file>
UNIX
Windows
Sets the path and file name for the MSC.Flightloads message file. See Flightloads and Dynamics Setup, 43 for additional information.
P3_ALLOW_USER_UGII_SETTINGS <yes/no>
UNIX
Windows
Allows Patran to use alternate installations of Unigraphics. Setting to “yes” forces Patran to use current Unigraphics environment variables instead of built in Patran Unigraphics Access library variables.
setenv P3_ALLOW_USER_UGII_SETTINGS yes
UGII_TMP_DIR <dir>
UGII_UGSOLIDS_TMP <dir>
UNIX
Windows
Set the scratch directories for Unigraphics CAD Access and the Unigraphics CAD Access UGSOLID module.
setenv UGII_UGSOLIDS_TMP /tmp
MSC_PRE_NX5_LICENSE
UNIX
Windows
If you intend to use UG NX 4.0 or earlier with Patran, you need to set the environment variable:
setenv('MSC_PRE_NX5_LICENSE','yes');
MSCP_PROE_CMD
UNIX
Windows
The location of your Pro/ENGINEER installation:
setenv(‘ MSCP_PROE_CMD=/bin/proe’)
MSCP_PROE_PREWF4
UNIX
Windows
If you intend to use WildFire 3 or earlier with Patran you need to set the environment variable:
setenv(‘ MSCP_PROE_PREWF4’,’yes or no’)
CAT_UNLOAD <dir>
UNIX
Windows
Sets the directory where CATIA is unloaded for use by Patran CATDirect Access. Default is /usr/catia/unload.
CATIA <dir>
UNIX
Windows
Sets the directory where CATIA configuration files are located for use by Patran CATDirect Access. Default is /usr/catia/cfg.
CAT_CUST ~<username>
UNIX
Windows
Sets the CATIA administrator’s account for use by Patran CATDirect Access.
Default is ~catadm.
CATMSTR <declaration_file>
UNIX
Windows
Sets the CATIA user declaration file to be used by Patran CATDirect Access.
Default is $HOME/USRENV.dcls.
MSCP_CATIA_LANG <language>
UNIX
Windows
Sets the CATIA language to be used by Patran CATDirect Access. Default is en_US (en_US.iso88591 on HP-UX systems).
CATIA_TMP_DIR <dir>
UNIX
Windows
Set the default scratch directory for CATDirect Access.
CATIAV5DIR
UNIX
Windows
Sets the Directory where CATIA v5 run-time libraries are located.
CATIAPlat
UNIX
Windows
For use by Patran CATDirect v5 Access.
CATInstallPath
UNIX
Windows
For use by Patran CATDirect v5 Access.
CATDLLPath
UNIX
Windows
For use by Patran CATDirect v5 Access.
CATICPath
UNIX
Windows
For use by Patran CATDirect v5 Access.
CATCommandPath
UNIX
Windows
For use by Patran CATDirect v5 Access.
CATDictionaryPath
UNIX
Windows
For use by Patran CATDirect v5 Access.
CATReffilesPath
UNIX
Windows
For use by Patran CATDirect v5 Access.
CATFontPath
UNIX
Windows
For use by Patran CATDirect v5 Access.
CATGraphicPath
UNIX
Windows
For use by Patran CATDirect v5 Access.
CATMsgCatalogPath
UNIX
Windows
For use by Patran CATDirect v5 Access.
IDEASROOT
UNIX
Windows
Sets the root installation location for I-deas CAD system and used by Patran I-deas Access.
IDEAS_VERSION
UNIX
Windows
Sets the version of I-deas installed.
ORBIX
IT_CONFIG_PATH
IT_PRODUCT_DIR
IT_DOMAIN_NAME
IT_CONFIG_DOMAINS_DIR
IT_LICENSE_FILE
UNIX
Sets run_time library locations of I-deas used by Patran I-deas Access.
$IDEASROOT/orbix
$IDEASROOT/orbix/cfg
$IDEASROOT/orbix
openideas11
/etc/opt/iona/domains *
$IT_PRODUCT_DIR/etc/licenses.txt
Note: * : This value for IT_CONFIG_DOMAINS_DIR is given presuming that iona directory is installed under /etc/opt.
Requirements for I-deas import:
Interop R18: Ideas import only works with Interop R18 sp3 installed
HP: IBM: Ideas-11 must be installed. The Orbix daemons must be installed and running.
SUN: Ideas-12 must be installed. The Orbix daemons must be installed and running.
WINNT: Ideas-12 must be installed. The IONA services must be installed and running.
Note: Ensure that IONA directory is installed under IDEASROOT for Windows.
Note: Ideas must be started from Start>program>I-DEAS 12>I-DEAS Command Prompt for Patran to be able to import the Ideas model.
P3_PORT <port_num>
P3_MASTER <hostname>
P3_PLATFORM <platform>
P3_ORG <org_name>
UNIX
Sets QueMgr definitions. For more information see Organization Environment Variables (p. 103) in the Patran Analysis Manager User’s Guide. Applicable to UNIX installations only.
P3CONVERT2001R1_TEMPLATE
P3UPGRADE2001R1_TEMPLATE <dbname>
P3CONVERT2003_TEMPLATE
P3CONVERT2003R2_TEMPLATE
P3CONVERT2004R2_TEMPLATE
P3CONVERT2005_TEMPLATE
P3CONVERT2005R2_TEMPLATE
P3CONVERT2006_TEMPLATE
P3CONVERT2007_TEMPLATE
P3CONVERT2008_TEMPLATE
P3CONVERT2010_TEMPLATE
UNIX
Windows
Patran v2001 and later reference the template database to convert databases from earlier versions. Since the Patran PAMCRASH, LSDYNA3D, and SAMCEF require custom template databases (see Creating Custom Template Databases, 74), these variables allow the custom database to be referenced. See Patran Custom Database Conversion, 78 for additional information.
P3_HELP_MODE
UNIX
Windows
Specifies Patran to use the HTML helpsystem.
P3_BRW_HELP
UNIX
Windows
Specifies the location of the HTML Browser for the context sensitive HTML help, e.g., c:\Program Files\Internet Explorer\iexplore.exe
P3_HELP_DIRECTORY
UNIX
Windows
Specifies the location of the HTML help files directory, e.g., $P3_HOME/helpfiles/html_patran/
When this variable is not set, the default set of help files from the MSC Software website are accessed:
http://www.mscsoftware.com/patran/current/html_patran/
For other sets of documentation, set your P3_HELP_DIRECTORY environment variable to:
http://www.mscsoftware.com/patran/patran_2010/html_patran/
http://www.mscsoftware.com/patran/patran_2008r2/html_patran/
http://www.mscsoftware.com/patran/patran_2008r1/html_patran/
http://www.mscsoftware.com/patran/patran_2007/html_patran/
http://www.mscsoftware.com/patran/patran_2005r3/html_patran/
http://www.mscsoftware.com/patran/patran_2005r2/html_patran/
PDB_C_CACHE_SIZE <bytes> PDB_C_CACHE_SIZE AUTO PDB_C_CACHE_SIZE AUTO<%>
UNIX
Windows
Specifies the maximum amount of virtual memory the Patran database system (PDB) will access. Set this value prior to executing Patran.
setenv PDB_C_CACHE_SIZE 786432000
The minimum allowable value is 10MB (10485760) and the maximum allowable value is 2GB (2097152000). You can also use the word AUTO to automatically specify 75% usage of available memory. Or you can specify a percentage after the AUTO (e.g. AUTO90 or AUTO70) to specify the percentage of memory to use. For additional information see Patran Database Caching and Swapping, 76.
P3_SPATIAL_VERSION
UNIX
Windows
Specifies the version of the Interop libraries that Patran will use when importing CAD models. Can be set to r18_sp3_1, r20 or r20sp1 as long as all or any of those spatial version are installed with Patran.
PDB_C_SWAP_DIR <dir>
UNIX
Windows
Specifies the locally mounted directory in which a scratch/swap file is to be allocated, if necessary. The setting of this value only takes effect before swapping starts.
The default is NULL, which causes the value stored in the unix TMPDIR environment variable, or the value stored in the Windows TMP environment variable to be used if they
are set.
For additional information see Patran Database Caching and Swapping, 76.
PDF_LOCKING_DISABLED <yes/no>
UNIX
Windows
Disables file locking on a database. With file locking enabled (the default), only one Patran process may access the database at once. The default is “No”.
MSC_LICENSE_FILE <port@hostname>
MSC_LICENSE_FILE <license_file_path>
UNIX
Windows
Sets the location of the license.dat file or the port address for the license server for FLEXlm licensing of Patran products. If not set, Patran will look in /msc/msc_licensing/licenses/license.dat.
setenv MSC_LICENSE_FILE 1011@alpha1
setenv MSC_LICENSE_FILE /msc/msc_licensing/licensing/license.dat
FLEXLM_DIAGNOSTICS <value>
UNIX
Windows
Sets Patran licensing into a diagnostic mode. Setting a value=3 prints out diagnostic information including license file location or license server name and port.
On UNIX data is written to stdout. On Windows data is written to a file called flexnnn.log
setenv FLEXLM_DIAGNOSTICS 3
HOMEDRIVE <x:>
HOMEPATH <dir>
Windows
Sets the home drive and directory for the current user. Patran will write files (e.g. patran.ses) to this directory if run from the Start menu or icon. If run from a DOS Command Prompt, these files will be written to the current directory.
set HOMDRIVE=d:
set HOMEPATH=\users\me
P3_ENABLE_NFS_DB_ACCESS <yes/no>
UNIX
Applicable only when accessing Patran v7.6 or earlier databases.
Sets InterBase NFS Access option on or off. If set to yes, the “Enable NFS Access” will be on by default on the File/New and File/Open forms.
setenv P3_ENABLE_NFS_DB_ACCESS yes
TMP <dir>
UNIX
Windows
Sets the directory used by InterBase for scratch. Applicable only when accessing Patran v7.6 or earlier databases. Default is /tmp:
setenv TMP /tmp
TMPDIR <dir>
UNIX
Windows
A standard UNIX or Windows variable. Used by Patran to determine the location for PDB scratch files.
setenv TMPDIR /tmp
For additional information see Patran Database Caching and Swapping, 76.
ABAQUS_DRA_UPGRADE_ODB
UNIX
Windows
If an older version of an ABAQUS ODB results file is accessed than the currently supported version, this variable allows automatic conversion. It must be set to YES. The file can also be converted using ABAQUS.
P3_mainFont <main_font>
UNIX
Sets the main font for menu windows. Can also be set with an application resource file. See UNIX Application Resources and Fonts, 61 for
more details.
setenv P3_mainFont 9x15bold
P3_textFont <text_font>
UNIX
Sets font used for databox text. See above.
P3_spreadFont <spread_font>
UNIX
Sets font used in spreadsheets. See above.
MSC_SX_HOME
Windows
If this variable is set to the directory path/location of a valid local installation of SimXpert, then SimXpert can be launched from Patran via the File pulldown menu and model data can be imported through the Analysis application using the MSC or MD Nastran preference.
SM_RICH_CLIENT_IC_HOST
UNIX
Windows
The node/machine host name or IP address of the SimManager server that Patran is connecting to
SM_RICH_CLIENT_IC_PORT
UNIX
Windows
The port number of the SimManager server that Patran is connecting to. Tomcat default is 8080. WebSphere default is 9085
SM_RICH_CLIENT_IC_PROTOCOL
UNIX
Windows
The communication protocol that Patran uses to communicate with the SimManager server. Typically http or https
SM_RICH_CLIENT_IC_WEBCONTEXT
UNIX
Windows
The name of the SimManager web server context that is defined during the installation of SimManager.
RC_ROOT
UNIX
Windows
Location of the SimManager RichClient
JDK_PATH
UNIX
Windows
Location of the JDK folder for respective machine under RC_ROOT. Currently we are using 1.5.0 version.
APPS
UNIX
Windows
Location of the UI_Component under RC_ROOT
ACTION_LOC
UNIX
Windows
Location of the ACTION_Component under RC_ROOT
JARS_PATH
UNIX
Windows
Location of the RichClientDriver under RC_ROOT
CLASSPATH
UNIX
Windows
Path of the following jar files under ACTION_LOC,
MscSimMgrAction.jar
ui.jar
dom4j-1.6.1.jar
jaxen-1.1.1.jar
appUtil.jar
SCA_SYSTEM
UNIX
Windows
Location of the SCA_Kernel under RC_ROOT
SCA_RESOURCE_DIR
UNIX
Windows
Path of the resource directories under SCA_SYSTEM, APPS & ACTION_LOC
SCA_SERVICE_CATALOG
UNIX
Windows
Path of the service catalog files under resource directories of SCA_SYSTEM, APPS & ACTION_LOC
SCA_JAVA_COMP_PATH
UNIX
Windows
Path of the java directories under APPS & ACTION_LOC
SCA_JVM_CONFIG
UNIX
Windows
Config variable.
RC_LIBRARY_PATH
UNIX
Windows
Path to the required runtime binaries under JDK_PATH and SCA_SYSTEM.
This path variable is appended to LD_LIRBARY_PATH under Unix and PATH variable under Windows to load runtime libraries. This variable is specific to Patran - SimManager integration. Please make sure finally the PATH and LD_LIBRARY_PATH should be set such that it points to correct version of Java as mentioned in JDK_PATH variable.
SM_R4_LOGIN_ADDRESS
UNIX
Windows
Login address
(ex: http://idev-win32:8000/SimManager).
This variable is specific to Patran-SimManager integration.
The above environment variables should be set before invoking SimManager from Patran. These variables will be available within the Patran installation.
For detailed description and usage of the above environment variables refer SimManager documentation.
The SimManager environment variables should be set before invoking SimManager from Patran. These variables are available within the Patran installation.
For detailed description and usage of the above environment variables refer SimManager documentation.