Installation and Operations Guide > User Environment > 4.4 The *.pcl and *.def Setup Files
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
4.4 The *.pcl and *.def Setup Files
Patran’s various customization files are applicable to both UNIX and Windows installations unless otherwise noted.
The settings.pcl File
The settings.pcl file contains parameters that Patran uses at start-up. All entries are PCL commands and use the format:
pref_env_set_<datatype>( “<variable>”, “<setting>” )
Patran searches for a settings.pcl in the following order: current working directory, users home directory (login directory on UNIX, and home directory as defined by the user profile or HOMEDRIVE:HOMEPATH on Windows), and finally in $P3_HOME.
If it does not find a settings.pcl file, it creates the file in the working directory. Users may wish to copy this file to their home directory.
 
Note:  
The settings.pcl file in the Patran installation directory is read only. If you want to modify the settings.pcl file in the installation directory, you will need to change permissions on the file to make it read/write.
MSC recommends that users modify a file created by Patran since the format is very specific. Important variables and settings are listed in Table 4‑3. For example, a proper setting to turn on hardware graphics would be:
pref_env_set_string( “graphics_hardware”, “YES” )
 
Table 4‑3
Variable
Setting
Purpose
graphics_hardware
string: YES/NO
Turns on or off use of hardware graphics. See Graphics Boards and OpenGL Acceleration, 91
graphics_colors
integer: 64<val<256
Number of Xwindow colormap colors Patran will use, if not capable of running in fullcolor mode.
graphics_refresh
string: YES/NO
If set to YES, Patran will automatically refresh the viewport when it changes. This is useful on systems that do not have backing store capability.
ToolbarHeight
real: 0<val<1
Height of the icon toolbar. Set automatically.
ApplSwitchHeight
real: 0<val<1
Height of form switch area. Set automatically.
VisibleHistoryItems
integer: 1<val<80
Size of history window in lines.
pick_rectpoly
integer: 1,2,3
Whether you enclose the entire entity (1), its centroid(2), or a portion of the entity(3).
show_cycle_picking_form
logical: TRUE/FALSE
Causes Patran to display a cycle clicking box when select databoxes are active.
entity_picking_cursor
string: holeangle
xhole
+hole
+
x
Defines cursor type for selecting when select databoxes are active. Typically this is set using the Preferences|Picking form.
select_menu_always_on_top
logical: TRUE/FALSE
Causes the select menu to always float above all other forms. This must be set to “FALSE” on Windows installations. Otherwise, users will not be able to type into select list boxes.
DefaultMeshSize
real
Sets the default value for “Global Edge Length” on the Finite Element Create forms in Patran.
SmallScreenLayout
logical: TRUE/FALSE
A TRUE setting invokes Patran in a layout suitable for 1024x768 displays. This variable is not automatically created in the settings.pcl file and must be entered by hand. Default is FALSE.
NastranCardFormat
String:
Either
Small
Large
Sets the default for determining whether real numbers are written to a standard (8 character) NASTRAN field (Small) or to a double (16 character) NASTRAN field (Large). If Either is set, the precision necessary will determine whether an 8 or 16 character field is used. This simply sets the default as it appears on the Translation Parameters form for the MD Nastran Preference. See Section 3.2 Translation Parameters (MD Nastran Structural Guide).
NastranResultsOutput
string:
XDB Only
XDB and Print
OP2 Only
OP2 and Print
Print Only
None
This variable is obsolete and has been superceeded by the NASTRAN_XXX_DATA_OUTPUT variables. Please see the table below for more information. Defines the default results file format type for the MSC Nastran Preference. This can be changed from within Patran sessions. The default is “XDB and Print”.
NASTRAN_101_DATA_
OUTPUT
XDB+PRINT
For more information on setting the Nastran Results Output, please see, Nastran Results Output, 67.
These settings.pcl parameters are formulated like this:
pref_env_set_string( "NASTRAN_XXX_DATA_OUTPUT", value)
where XXX is the solution sequence number and value is some combination of the values "OP2", "XDB", "PRINT", "PUNCH", "MASTER", "DBALL" concatanted by a "+". Examples:
pref_env_set_string( "NASTRAN_101_DATA_OUTPUT","XDB+PRINT")
pref_env_set_string( "NASTRAN_200_DATA_OUTPUT","OP2+PRINT+PUNCH")
pref_env_set_string( "NASTRAN_400_DATA_OUTPUT","MASTER+DBALL_OP2")
NASTRAN_200_DATA_
OUTPUT
OP2+PRINT+
PUNCH
NASTRAN_400_DATA_
OUTPUT
MASTER+DBALL_OP2
 
 
 
xor_hilighting_enabled
logical: TRUE/FALSE
Turns on or off pre-selection entity highlighting when the cursor passes over that entity in the viewport. the default is TRUE.
preselection_line_width
integer
Sets the width of pre-selection highlighting graphics. The default is 3.
result_quick_avg_method
string: DeriveAverage
AverageDerive
Difference
Sum
Changes the default averaging method for Fringe and Quick plots in Patran Results Post-processing.
result_quick_transform
string:
Global
AsIs
Default
Changes the default transformation coordinate system for Fringe and Quick plots in Patran Results Post-processing. Note that unless this variable is set, Fringe plots use “as is” coordinate transformation and Quick plots use “default” transformation.
RESULTS_TITLE_CHECK_LEVEL
integer
In cases where an existing jobname is active but an XDB file is attached with subcases not associated to the active job, the results cases pick up the jobname instead of the actual subcase name as defined in the Nastran job. A new settings.pcl variable has been implemented to control this.
This is an integer value with the following meanings:
0 (or not set at all) = current functionality is maintained
1 = If the jobname and the XDB filename differ, then ignore the jobname when creating the result case titles. This would be just like the described workaround of clearing the jobname listbox and attaching to an XDB file. Thus it will not append the jobname to the beginning of the results case title. No messaging – it just does it.
2 = If the jobname and the XDB filename differ, then put up a message notifying the user as such and asking if he wishes to continue with the attachment. It is either a Yes or No. If Yes, then the attachment occurs. If no, then the attachment is abandoned.
3 = If the jobname and the XDB filename differ, then put up warning message with a simple acknowledgement OK button. The attachment will still occur regardless.
In all cases, if the jobname and the XDB filename are the same, then the functionality remains the same.
graphics_batch_dpi
real
Sets the resolution of the graphic images ( JPEG, MPEG, TIFF, PNG, BMP files) when Patran is invoked via batch mode using the -b and -graphics command line arguments simultaneously. Batch mode does not know the dpi resolution and defaults to 100 if this environment variable is not set.
Nastran Results Output
There are two variables that set the results output for MD Nastran. Both the variable NastranResultsOutput and NASTRAN_XXX_DATA_OUTPUT work, but it is important to understand which takes precedence when you run Patran.
1. If the Results Output form has been opened and values set and the job saved, then none of the above settings will change what is set in the form for that job. The values used ,are the values from the database for that job. Database settings override any settings, but only for the selected job.
2. If neither NastranResultsOutput or NASTRAN_XXX_DATA_OUTPUT settings are present in the settings.pcl file, then the default settings for the current solution sequence is used. The default may be and is different for different solution sequences (101-199, 200, 400 have different defaults).
3. If the NastranResultsOutput variable (obsolete) setting is present, and the values are not found in the database, then this will be used. It is not specific to solution sequence.
4. If the NastranResultsOutput is not present in the settings.pcl file, but the second or some combination of the second type, and the values are not found in the database, then this will be used (NASTRAN_XXX_DATA_OUTPUT).
So for example, if you have an existing job and you select it, it will use the database values if they are present. If they are not present and you have no settings.pcl or the above parameters in it, the defaults will be used. If you have a settings.pcl file, the NastranResultsOutput will be used first and the others ignored if both are present. If NastranResultsOutput is not present and the others are, then they will be used if not defined by the database values for the job. If you select a job, but then change the solution sequence of that job, it will try to read the settings.pcl values since the default or defined data output values may be different for a different solution sequence.
The p3epilog.pcl File
Use the p3epilog.pcl file to include custom PCL programs into Patran at start-up.
Patran searches for a settings.pcl in the following order:
1. current working directory
2. users home directory (login directory on UNIX, and home directory as defined by the user profile or HOMEDRIVE:HOMEPATH on Windows)
3. $P3_HOME
For additional information see PCL Start-Up File (p. 35) in the PCL and Customization.
Definition Files
Patran recognizes several files ending in .def at start-up.
Patran searches for .def files first in the current working directory, next in the users home directory (login directory on UNIX, and home directory as defined by the user profile on Windows), and finally in $P3_HOME. The exception is p3toolbar.def, which is not searched for in the working directory.
The Patran Reference Manual describes each of these files. Default examples are created in the $P3_HOME directory during installation.
 
Table 4‑4
File
Description
p3_printers.def
Defines printers available for hardcopy. See Printer Configuration File (p. 244) in the Patran Reference Manual.
p3_user_menu.def
Defines a user menu on the top menu bar for shareware PCL utilities.
p3quickpick.def
UNIX only. Defines icons and commands for the floating quickpick tools. See The Tool Bar (p. 14) in the Patran Reference Manual.
p3toolbar.def
Defines icons and commands for the icon toolbar. See The Tool Bar (p. 14) in the Patran Reference Manual. The format of this file is slightly different between UNIX and Windows.