Installation and Operations Guide > User Environment > 4.5 Command Line Arguments
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
4.5 Command Line Arguments
Patran recognizes a number of command line arguments. For example, the following UNIX command causes Patran to execute the commands in test.ses upon opening, to this session to example1.ses, and to store 500 lines of commands in the history window:
% patran -sfp test.ses -sfr example1.ses -hl 500
Command line options are applicable to both UNIX and Windows unless otherwise noted (see note about Windows below):
 
Table 4‑5
Command Line Arguments
Purpose
-ans <yes/no>
Forces all prompts in Patran to be answered yes or no. Use this with extreme caution.
-auth <license_loc>
Specifies a location for Patran to obtain a license. Overrides all MSC_LICENSE_FILE settings (including 'OverWrite' on Windows).
-b
Causes Patran to execute in batch mode (without windows). If entered with no other flags, Patran will run a test of licensing and write permissions, then exit.
In batch mode, Patran does not accept input from the mouse or keyboard. If given with the -sfp flag, Patran will execute the given session file with no graphics.
-bg <xcolor>
-fg <xcolor>
UNIX only. Sets the background and foreground colors for menu windows (not the viewport). These are typically set in the application resource file.
-db
Causes Patran to open a user specified database on startup.
-display <device>
Redirects display to given device. Equivalent to environment variable command:
setenv DISPLAY device:0.0
-EchoEnv
Causes Patran to list environment variables that it has recognized, including those set in the .site_setup file.
-fn <font>
Sets the font used for menu windows.
-tfn <font>
Sets the font used for text data boxes.
-sfn <font>
Sets the font used in spreadsheets.
-hb <idle/off>
Controls the Patran heartbeat in the upper right corner of the screen. If set to idle, the heart beats constantly regardless of activity. If set to off it will never beat.
-l
Enables Large Listbox mode for properties and materials.
-hl <#_lines>
Sets the number of visible lines stored in the history window. UNIX default is 200. Maximum is 10000. Windows default is 50 lines with no maximum tested for.
-iam <product>
Sets the mode that the software starts up as. Patran mode does not require this to be defined. Examples:
patran -iam MSC.FEA
patran -iam MSC.AFEA
patran -iam md
patran -iam MSC.TFEA
-ifile <init.pcl file>
Sets the PCL initialization file used at Patran startup. Defaults is $P3_HOME/init.pcl. It is used in conjuction with the “-iam” flag. Example:
patran -iam MSC.FEA -ifile init_fea.pcl
-sfp <ses_file>
Causes Patran to execute the user supplied session file named <ses_file> upon start-up.
-sfr <ses_file>
Causes Patran to open and record the executed Patran commands to the session file named <ses_file> instead of the default patran.ses.xx.
-showfonts
UNIX only. Causes Patran to show which fonts are being used.
-stdout
Windows only. Opens a DOS text window which displays Patran diagnostic messages. On UNIX Patran automatically writes these messages to its parent UNIX shell.
-stdout <log_file>
Windows only. Writes Patran diagnostic messages to the file specified by <log_file>.
-graphics
Use in conjunction with the -b(atch) and -sfp arguments. It allows Patran to be run in batch mode and still produce graphical images via a session file when requesting JPEG, MPEG, TIFF, PNG, BMP files. The resolution of the graphic images is controlled by a settings.pcl command: pref_env_set_real( "graphics_batch_dpi", real_value). Batch mode does not know anything about the dpi resolution and defaults to 100 if this environment variable is not set.
-skin <skin>
Windows only. By default launches Patran with a different GUI (Graphical User Interface) skin. Options are office2007 (default), xptunes, xproyale, xpluna, ie5, and vista. The skin option can also be turned off, or the skin changed by modifying the target field of the icon used to start Patran.
 
Note:  
On Windows, in order to use any of these command line arguments, you can edit the properties of the Start menu or icon shortcut by right mouse clicking on the shortcut and selecting properties. Then from the Target entry you can add these command lines. Invoking Patran from the command prompt is actually a batch file. This file can be edited to include any of these command line arguments also.