You are on page 1of 56

Chapter 9: Preference Functions

PCL Reference Manual

9 Preference Functions


Introduction 1808
 Analysis Preferences 1809

Global Preferences 1812

Graphics Preferences 1825
 Report Preferences 1854
 Geometry Preferences 1857
 Finite Element Preferences 1861
1808 PCL Reference Manual
Introduction

Introduction
This chapter documents functions that are used to control some of the settings or preferences used by
many of the other forms used in Patran. Many of these functions are used in the implementation of the
“Preferences” menu bar item.
This chapter presents function descriptions in seven separate sections:

Analysis Preferences This section is used to describe some of the functions used to
govern some of the preferences used with the analysis of a model.
Global Preferences This section is used to describe some of the functions used to
govern some of the preferences used to control the global
behavior of Patran.
Graphics Preferences This section is used to describe some of the functions used to
govern some of the preferences used to control how graphics are
displayed to the user.
Report Preferences This section is used to describe some of the functions used to
govern some of the preferences used to control the generation of
reports.
Geometry Preferences This section is used to describe some of the functions used to
govern some of the preferences used to define how geometry is
interpreted.
Finite Element Preferences This section is used to describe some of the functions used to
govern some of the preferences used with finite element model
elements.
Chapter 9: Preference Functions 1809
Analysis Preferences

Analysis Preferences
This section is used to describe some of the functions used to govern some of the preferences used with
the analysis of a model.

uil_pref_analysis.set_analysis_pref (analysis_code, analysis_type,


input_file_suffix, output_file_suffix)

Description:
This function changes the analysis preferences of the current database.
Input:
STRING analysis_code[31] This value specifies the analysis code or the name of the
solver to be used. See the remarks below for more
information.
STRING analysis_type[31] This value specifies the type of analysis provided by the
solver. See the remarks below for more information.
STRING input_file_suffix This value specifies the default suffix for the chosen analysis
[4] code’s input files. See the remarks below for more
information.
STRING output_file_suffi This value specifies the default suffix for output files from
x[4] the chosen analysis code. See the remarks below for more
information.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form that is displayed when “Preferences”,
“Analysis...” is selected from the menu bar.
Many of the forms and menus in Patran are dependent upon the settings represented by the input values
analysis_code and analysis_type. Changing these values can modify the contents of many of these forms
and menus. Calling the function ui_wid_refresh() after this function is called will update any forms or
menus that are currently displayed and make use of the analysis code and type values.
In previous releases of Patran, analysis preferences were changed with a function sequence as follows:
sys_library( “add”, * )

pref_anal_set ( anal_code, anal_type, input_file_suffix,@

output_file_suffix )
1810 PCL Reference Manual
Analysis Preferences

sys_library( “remove”, * )

This sequence will still work but is obsolete and all three of these calls should be replaced with the new
PCL function described above.
Another obsolete function which might appear in old Patran session or journal files and should be
replaced is:
uil_pref_setcode.save_anal_values ( anal_code, anal_type,@

input_file_suffix, output_file_suffix )

The input values analysis_code, analysis_type can have the following values. Note that the value allowed
for the analysis_type is dependent on the value used for the analysis_code. The default values for the
input value input_file_suffix and output_file_suffix are listed as well:
Chapter 9: Preference Functions 1811
Analysis Preferences

Analysis code Analysis type Input suffix Output suffix

ABAQUS Structural .inp .fil


ABAQUS Thermal .inp .fil
ANSYS Structural .prp 12.*
ANSYS Thermal .prp 12.*
ANSYS 5 Structural .prp .rst
ANSYS 5 Thermal .prp .rst
MARC K5 Structural .dat .t16
MARC K5 Thermal .dat .t16
MARC K6 Structural .dat .t16
MARC K6 Thermal .dat .t16
MSC Nastran Structural .bdf .op2
MSC Nastran Thermal .bdf .op2
Structural .ntl .res
Patran FEA
Thermal .ntl .res
Patran FEA
Structural .fil
Patran Advance FEA
Thermal .fil
Patran Advance FEA
Thermal .ntl .nrf
Patran Thermal
Structural .out .out
Patran 2 NF
Thermal .out .out
Patran 2 NF

Example:

Please see uil_pref_analysis.set_analysis_pref.


1812 PCL Reference Manual
Global Preferences

Global Preferences
This section is used to describe some of the functions used to govern some of the preferences used to
control the global behavior of Patran
.

pref_geo_get_v1 (default_coord_frame, geometric_tolerance, working_plane)

Description:
This function will get geometry preference settings.
Input:
None.
Output:
INTEGER default_coord_frame This value returns the identifier value for the default
coordinate frame.
REAL geometric_tolerance This value returns the relative geometric tolerance.
INTEGER working_plane This value returns the value defining the default working
plane relative to the default coordinate frame.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form that is displayed when “Preferences”, “Global...”
is selected from the menu bar.
Example:

Please see pref_geo_get_v1.


Chapter 9: Preference Functions 1813
Global Preferences

pref_geo_get (default_coord_frame, geometric_tolerance)

Description:
This function will get geometry preference settings.
Input:
None.
Output:
INTEGER default_coord_frame This value returns the identifier value for the default
coordinate frame.
REAL geometric_tolerance This value returns the relative geometric tolerance.
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
None.

Example:

Please see pref_geo_get.

pref_geo_set (default_coord_frame, geometric_tolerance)

Description:
This function will set geometry preference settings.
Input:
INTEGER default_coord_frame This value specifies the identifier value for the default
coordinate frame.
REAL geometric_tolerance This value specifies the relative geometric tolerance.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
None.
1814 PCL Reference Manual
Global Preferences

Remarks:

The geometric tolerance is set to 0.005 for the default value. This value needs to be changed depending
on the model size. Users are advised to set this value so that CAD models and IGES geometry are
imported properly. The suggested geometry tolerance is 0.005 times the model size.
Example:

Please see pref_geo_set.

pref_geo_set_v1 (default_coord_frame, geometric_tolerance, working_plane)

Description:
This function will set geometry preference settings.
Input:
INTEGER default_coord_frame This value specifies the identifier value for the default
coordinate frame.
REAL geometric_tolerance This value specifies the relative geometric tolerance.
INTEGER working_plane This value specifies the value defining the default working
plane relative to the default coordinate frame. Valid values
are: 1 = to place the working plane along the X, Y axis, 2 =
the Y, Z axis, and 3 = the X, Z axis.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form that is displayed when “Preferences”, “Global...”
is selected from the menu bar.
The geometric tolerance is set to 0.005 for the default value. This value needs to be changed depending
on the model size. Users are advised to set this value so that CAD models and IGES geometry are
imported properly. The suggested geometry tolerance is 0.005 times the model size.
Example:

Please see pref_geo_set_v1.


Chapter 9: Preference Functions 1815
Global Preferences

pref_global_get (confirm, warning_message, global_tolerance)

Description:
This function will get global preference settings.
Input:
None.
Output:
LOGICAL confirm This value returns nothing as it is currently not used.
INTEGER warning_message This value returns the status for the warning message option.
This value will be set to: 1 = no warnings, 2 = ring the bell, and
3 = present a warning in a popup form.
REAL global_tolerance This value returns the global model tolerance.
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form that is displayed when “Preferences”, “Global...”
is selected from the menu bar.
Example:

Please see pref_global_get.


1816 PCL Reference Manual
Global Preferences

pref_global_set (confirm, warning_message, global_tolerance)

Description:
This function will set global preference settings.
Input:
LOGICAL confirm This value specifies nothing as it is currently not used.
INTEGER warning_message This value specifies the status for the warning message option.
This value will be set to: 1 = no warnings, 2 = ring the bell, and 3
= present a warning in a popup form.
REAL global_tolerance This value specifies the global model tolerance.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed successfully and
a non zero value to indicate a change in status or an error.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form that is displayed when “Preferences”, “Global...”
is selected from the menu bar.
Example:

Please see pref_global_set.


Chapter 9: Preference Functions 1817
Global Preferences

pref_env_get_integer (preference_name, integer_value)

Description:
This function will get the value of the named integer preference.
Input:
STRING preference_name[] This value specifies the name of the preference from which the
output value integer_value will be retrieved This name can be of
any length or value.
Output:
INTEGER integer_value This value returns the integer setting for the preference.
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
12002001 The environment preference was not found.
12002002 The environment preference is of the wrong datatype.

Remarks:

This is one of the functions used in the settings.pcl file to store various values used when Patran is started
up.
The values retrieved or stored by this function are not placed in the database. They are stored in a linked
list in memory. The contents of this linked list are saved and restored through the settings.pcl file
mechanism. This settings.pcl file is written on exit from Patran and read when Patran is started up.

Example:

Please see pref_env_get_integer.


1818 PCL Reference Manual
Global Preferences

pref_env_get_logical (preference_name, logical_value)

Description:
This function will get the value of the named logical preference.
Input:
STRING preference_name[] This value specifies the name of the preference from which the
output value logical_value will be retrieved. This name can be
of any length.
Output:
LOGICAL logical_value This value returns the logical setting for the preference.
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
12002001 The environment preference was not found.
12002002 The environment preference is of the wrong datatype.

Remarks:

This is one of the functions used in the settings.pcl file to store various values used when Patran is started
up.
The values retrieved or stored by this function are not placed in the database. They are stored in a linked
list in memory. The contents of this linked list are saved and restored through the settings.pcl file
mechanism. This settings.pcl file is written on exit from Patran and read when Patran is started up.

Example:

Please see pref_env_get_logical.


Chapter 9: Preference Functions 1819
Global Preferences

pref_env_get_real (preference_name, real_value)

Descriptio:
This function will get the value of the named real preference.
Input:
STRING preference_name[] This value specifies the name of the preference from which
the output value real_value will be retrieved. This name can
be of any length.
Output:
REAL real_value This value returns the real setting for the preference.
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
12002001 The environment preference was not found.
12002002 The environment preference is of the wrong datatype.

Remarks:

This is one of the functions used in the settings.pcl file to store various values used when Patran is started
up.
The values retrieved or stored by this function are not placed in the database. They are stored in a linked
list in memory. The contents of this linked list are saved and restored through the settings.pcl file
mechanism. This settings.pcl file is written on exit from Patran and read when Patran is started up.

Example:

Please see pref_env_get_real.


1820 PCL Reference Manual
Global Preferences

pref_env_get_string (preference_name, string_value)

Description:
This function will get the value of the named string preference.
Input:
STRING preference_name[] This value specifies the name of the preference from
which the output value string_value will be retrieved.
This name can be of any length.
Output:
STRING string_value[] This value returns the string setting for the preference.
Because this is not a VIRTUAL string and no storage
space is allocated for this string by this function, it must
be created big enough to contain the entire named string
preference value or an error will occur.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change
in status or an error.
Error Conditions:
12002001 The environment preference was not found.
12002002 The environment preference is of the wrong datatype.
12002003 The string buffer is too small for the preference.

Remarks:

This is one of the functions used in the settings.pcl file to store various values used when Patran is started
up.
The values retrieved or stored by this function are not placed in the database. They are stored in a linked
list in memory. The contents of this linked list are saved and restored through the settings.pcl file
mechanism. This settings.pcl file is written on exit from Patran and read when Patran is started up.

Example:

Please see pref_env_get_string.


Chapter 9: Preference Functions 1821
Global Preferences

pref_env_set_integer (preference_name, integer_value)

Description:
This function will set the value of the named integer preference.
Input:
STRING preference_name[] This value specifies the name of the preference under
which the input value integer_value will be stored.
This name can be of any length.
INTEGER integer_value This value specifies the integer setting for the named
preference.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a
change in status or an error.
Error Conditions:
12002002 The environment preference is of the wrong datatype.
12002004 An error occurred creating an environment preference.

Remarks:

This is one of the functions used in the settings.pcl file to store various values used when Patran is started
up.
The values retrieved or stored by this function are not placed in the database. They are stored in a linked
list in memory. The contents of this linked list are saved and restored through the settings.pcl file
mechanism. This settings.pcl file is written on exit from Patran and read when Patran is started up.

Example:

Please see pref_env_set_integer.


1822 PCL Reference Manual
Global Preferences

pref_env_set_logical (preference_name, logical_value)

Description:
This function will set the value of the named logical preference.
Input:
STRING preference_name[] This value specifies the name of the preference
under which the input value logical_value will be
stored. This name can be of any length.
LOGICAL logical_value This value specifies the logical setting for the
named preference.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a
change in status or an error.
Error Conditions:
12002002 The environment preference is of the wrong datatype.
12002004 An error occurred creating an environment preference.

Remarks:

This is one of the functions used in the settings.pcl file to store various values used when Patran is started
up.
The values retrieved or stored by this function are not placed in the database. They are stored in a linked
list in memory. The contents of this linked list are saved and restored through the settings.pcl file
mechanism. This settings.pcl file is written on exit from Patran and read when Patran is started up.

Example:

Please see pref_env_set_logical.


Chapter 9: Preference Functions 1823
Global Preferences

pref_env_set_real (preference_name, real_value)

Description:
This function will set the value of the named real preference.
Input:
STRING preference_name[] This value specifies the name of the preference under
which the input value real_value will be stored. This
name can be of any length.
REAL real_value This value specifies the real setting for the named
preference.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change
in status or an error.
Error Conditions:
12002002 The environment preference is of the wrong datatype.
12002004 An error occurred creating an environment preference.

Remarks:

This is one of the functions used in the settings.pcl file to store various values used when Patran is started
up.
The values retrieved or stored by this function are not placed in the database. They are stored in a linked
list in memory. The contents of this linked list are saved and restored through the settings.pcl file
mechanism. This settings.pcl file is written on exit from Patran and read when Patran is started up.

Example:

Please see pref_env_set_real.


1824 PCL Reference Manual
Global Preferences

pref_env_set_string (preference_name, string_value)

Description:
This function will set the value of the named real preference.
Input:
STRING preference_name[] This value specifies the name of the preference under
which the input value string_value will be stored. This
name can be of any length.
STRING string_value[] This value specifies the string setting for the named
preference and can be of any length.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
12002002 The environment preference is of the wrong datatype.
12002004 An error occurred creating an environment preference.

Remarks:

This is one of the functions used in the settings.pcl file to store various values used when Patran is started
up.
The values retrieved or stored by this function are not placed in the database. They are stored in a linked
list in memory. The contents of this linked list are saved and restored through the settings.pcl file
mechanism. This settings.pcl file is written on exit from Patran and read when Patran is started up.

Example:

Please see pref_env_set_string.


Chapter 9: Preference Functions 1825
Graphics Preferences

Graphics Preferences
This section is used to describe some of the functions used to govern some of the preferences used to
control how graphics are displayed to the user.

bar_elem_color (color_value)

Description:
This function is used to set the color value used for the display of bar type finite element model
entities and labels.
Input:
INTEGER color_value This value specifies the color used. See the remarks
below for more information.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.

The input value color_value can have the following values:

Color Value Color Description Color Value Color Description


0 Black 8 Dark Orange
1 Red 9 Light Orange
2 Light Green 10 Dark Green
3 Yellow 11 Green
4 Blue 12 Dark Blue
5 Magenta 13 Light Blue
6 Cyan 14 Light Magenta
7 white 15 Pink

Example:

Please see bar_elem_color.


1826 PCL Reference Manual
Graphics Preferences

bar_elem_label (label_status)

Description:
This function sets a status value that indicates if bar type finite element model entity labels
will be displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that bar type
finite element model entity labels will be displayed,
and FALSE otherwise.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Example:

Please see bar_elem_label.

body_color (color_value)

Description:
This function is used to set the color value used for the display of bodies and body labels.
Input:
INTEGER color_value This value specifies the color used. See the remarks
below for more information.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Chapter 9: Preference Functions 1827
Graphics Preferences

The input value color_value can have the following values:

Color Value Color Description Color Value Color Description


0 Black 8 Dark Orange
1 Red 9 Light Orange
2 Light Green 10 Dark Green
3 Yellow 11 Green
4 Blue 12 Dark Blue
5 Magenta 13 Light Blue
6 Cyan 14 Light Magenta
7 white 15 Pink

Example:

Please see body_color.

body_label (label_status)

Description:
This function sets a status value that indicates if body labels will be displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that entity labels for
bodies will be displayed, and FALSE otherwise.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Example:

Please see body_label.


1828 PCL Reference Manual
Graphics Preferences

curve_color (color_value)

Description:
This function is used to set the color value used for the display of curves and curve labels.
Input:
INTEGER color_value This value specifies the color used. See the remarks below for more
information.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.

The input value color_value can have the following values:

Color Value Color Description Color Value Color Description


0 Black 8 Dark Orange
1 Red 9 Light Orange
2 Light Green 10 Dark Green
3 Yellow 11 Green
4 Blue 12 Dark Blue
5 Magenta 13 Light Blue
6 Cyan 14 Light Magenta
7 white 15 Pink

Example:
Chapter 9: Preference Functions 1829
Graphics Preferences

Please see curve_color.

curve_label (label_status)

Description
:
This function sets a status value that indicates if curve labels will be displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that entity labels for
curves will be displayed, and FALSE otherwise.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Example:

Please see curve_label (p. 1379) in the PCL Reference Manual Examples.

display_deformations (label_status)

Description
:
This function sets a status value that indicates if deformation results will be displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that deformation
results will be displayed.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
None.

Remarks:
1830 PCL Reference Manual
Graphics Preferences

This function is used in the implementation of the form displayed when the “Results...” selection is
picked from the “Display” pull down menu.
Example:

Please see display_deformations.

display_fa_vectors (label_status)

Descriptio:
This function sets a status value that indicates if functional assignment field vectors will be displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that functional
assignment field vectors will be displayed.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed successfully
and a non zero value to indicate a change in status or an error.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the “Load/BC/Elem. Props...”
selection is picked from the “Display” pull down menu.
Example:

Please see display_fa_vectors.

display_result_vectors (label_status)

Description
:
This function sets a status value that indicates if result vectors will be displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that functional
assignment field vectors will be displayed.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Chapter 9: Preference Functions 1831
Graphics Preferences

Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the “Results...” selection is
picked from the “Display” pull down menu.
Example:

Please see display_result_vectors.

hex_elem_color (color_value)

Description
:
This function is used to set the color value used for the display of hexagonal finite element model
entities and labels.
Input:
INTEGER color_value This value specifies the color used. See the remarks below
for more information.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.

The input value color_value can have the following values:

Color Value Color Description Color Value Color Description


0 Black 8 Dark Orange
1 Red 9 Light Orange
2 Light Green 10 Dark Green
3 Yellow 11 Green
4 Blue 12 Dark Blue
5 Magenta 13 Light Blue
1832 PCL Reference Manual
Graphics Preferences

Color Value Color Description Color Value Color Description


6 Cyan 14 Light Magenta
7 white 15 Pink

Example:

Please see hex_elem_color.

hex_elem_label (label_status)

Description:
This function sets a status value that indicates if hexagonal finite element model entity labels
will be displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that
hexagonal finite element model entity labels will be
displayed, and FALSE otherwise.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Example:

Please see hex_elem_label.


Chapter 9: Preference Functions 1833
Graphics Preferences

mpc_color (color_value)

Descriptio:
This function is used to set the color value used for the display of multi-point constraint labels.
Input:
INTEGER color_value This value specifies the color used. See the remarks below for
more information.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.

The input value color_value can have the following values:

Color Value Color Description Color Value Color Description


0 Black 8 Dark Orange
1 Red 9 Light Orange
2 Light Green 10 Dark Green
3 Yellow 11 Green
4 Blue 12 Dark Blue
5 Magenta 13 Light Blue
6 Cyan 14 Light Magenta
7 white 15 Pink

Example:

Please see mpc_color.


1834 PCL Reference Manual
Graphics Preferences

mpc_label (label_status)

Description:
This function sets a status value that indicates if multi-point constraint labels will be displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that multiple
point constraint labels will be displayed, and FALSE
otherwise.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Example:

Please see mpc_label.

node_color (color_value)

Description:
This function is used to set the color value used for the display of finite element model nodes and node
labels.
Input:
INTEGER color_value This value specifies the color used. See the remarks below for
more information.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Chapter 9: Preference Functions 1835
Graphics Preferences

The input value color_value can have the following values:

Color Value Color Description Color Value Color Description


0 Black 8 Dark Orange
1 Red 9 Light Orange
2 Light Green 10 Dark Green
3 Yellow 11 Green
4 Blue 12 Dark Blue
5 Magenta 13 Light Blue
6 Cyan 14 Light Magenta
7 white 15 Pink

Example:

Please see node_color.

node_label (label_status)

Description:
This function sets a status value that indicates if node labels will be displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that node labels
will be displayed, and FALSE otherwise.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Example:

Please see node_label.


1836 PCL Reference Manual
Graphics Preferences

point_elem_color (color_value)

Description:
This function is used to set the color value used for the display of point elements and
point element labels.
Input:
INTEGER color_value This value specifies the color used. See the remarks below
for more information.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.

The input value color_value can have the following values:

Color Value Color Description Color Value Color Description


0 Black 8 Dark Orange
1 Red 9 Light Orange
2 Light Green 10 Dark Green
3 Yellow 11 Green
4 Blue 12 Dark Blue
5 Magenta 13 Light Blue
6 Cyan 14 Light Magenta
7 white 15 Pink

Example:

Please see point_elem_color.


Chapter 9: Preference Functions 1837
Graphics Preferences

point_color (color_value)

Description:
This function is used to set the color value used for the display of geometric points and geometric
point labels.
Input:
INTEGER color_value This value specifies the color used. See the remarks below for
more information.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.

The input value color_value can have the following values:

Color Value Color Description Color Value Color Description


0 Black 8 Dark Orange
1 Red 9 Light Orange
2 Light Green 10 Dark Green
3 Yellow 11 Green
4 Blue 12 Dark Blue
5 Magenta 13 Light Blue
6 Cyan 14 Light Magenta
7 white 15 Pink

Example:

Please see point_color.


1838 PCL Reference Manual
Graphics Preferences

point_elem_label (label_status)

Description:
This function sets a status value that indicates if point element labels will be displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that point element labels
will be displayed, and FALSE otherwise.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Example:

Please see point_elem_label.

point_label (label_status)

Description:
This function sets a status value that indicates if point labels will be displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that point labels
will be displayed, and FALSE otherwise.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Chapter 9: Preference Functions 1839
Graphics Preferences

Example:

Please see point_label.

pref_graphics_set (label_control, display_method, primary_color,


secondary_color, error_color, extend, fit_view, center,
hardware_rendering, anti_alias, three_d_results,
result_title, symmetric_light, primary_marker,
secondary_marker, marker_color, marker_size,
point_marker_size, node_marker_size,
results_format, significant_figures)

Description:
This function sets the graphics preference parameters.
Input:
LOGICAL label_control(20) This value specifies which values from the inputs for
this function will be set in the database. The offsets in
the array correspond to the arguments listed below.
Setting the value at an offset in this array to TRUE will
cause the corresponding input argument value to be set
in the database.
INTEGER display_method This value specifies the display method setting.
INTEGER primary_color This value specifies the primary color.
INTEGER secondary_color This value specifies the secondary color.
INTEGER error_color This value specifies the error color.
LOGICAL extend This value specifies, when set to TRUE, that the
autoextend setting is turned on.
LOGICAL fit_view This value specifies, when set to TRUE, that the fit
view setting is turned on.
LOGICAL center This value specifies, when set to TRUE, that the
autocenter setting is turned on.
LOGICAL hardware_renderin This value specifies, when set to TRUE, the use of
g hardware for display rendering.
LOGICAL anti_alias This value specifies, when set to TRUE, that the anti
alias setting is turned on.
LOGICAL three_d_vector This value specifies, when set to TRUE, that 3-D
vectors be displayed.
LOGICAL result_title This value specifies, when set to TRUE, that result
titles be displayed.
1840 PCL Reference Manual
Graphics Preferences

LOGICAL symmetric_light This value specifies, when set to TRUE, that the
symmetric light flag setting is turned on.
INTEGER primary_marker This value specifies the primary marker setting.
INTEGER secondary_marker This value specifies the secondary marker setting.
INTEGER marker_color This value specifies the color used to display markers.
INTEGER marker_size This value specifies the marker size.
INTEGER point_marker_size This value specifies the point marker size.
INTEGER node_marker_size This value specifies the node marker size.
INTEGER results_format This value specifies the format used to display labels.
INTEGER significant_figures This value specifies the number of significant figures
used to display results.

Output:
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change
in status or an error.
Error Conditions:
None.

Example:

Please see pref_graphics_set.


Chapter 9: Preference Functions 1841
Graphics Preferences

quad_elem_color (color_value)

Description
:
This function is used to set the color value used for the display of quadrilateral finite element model
entities and entity labels.
Input:
INTEGER color_value This value specifies the color used. See the remarks below for
more information.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
The input value color_value can have the following values:

Color Color Description Color Color Description


Value Value

0 Black 8 Dark Orange


1 Red 9 Light Orange
2 Light Green 10 Dark Green
3 Yellow 11 Green
4 Blue 12 Dark Blue
5 Magenta 13 Light Blue
6 Cyan 14 Light Magenta
7 white 15 Pink

Example:

Please see quad_elem_color.


1842 PCL Reference Manual
Graphics Preferences

quad_elem_label (label_status)

Description:
This function sets a status value that indicates if quadrilateral finite element model entity labels will be
displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that
quadrilateral element labels will be displayed, and
FALSE otherwise.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Example:

Please see quad_elem_label.


Chapter 9: Preference Functions 1843
Graphics Preferences

renderstyle (render_style)

Description:
This function sets the style used to render the display of entities in a viewport.
Input:
STRING style[31] This value specifies the render style used. If this value
is set to nothing or ““, the default “Wireframe” render
style will be used. See the remarks below for more
information.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change
in status or an error.
Error Conditions:
None.

Remarks:

The input value render_style will accept the following case sensitive values:

“Wireframe” “Wireframe/Accurate”
“Hidden Line” “Hidden Line/Accurate”
“Shaded/Flat” “Shaded/Smooth”
“Fringe/Flat” “Fringe/Smooth”
“Fringe/Flat/Lighted” “Fringe/Smooth/Lighted”
“Element Fill” “Element Fill/Accurate”

Example:

Please see renderstyle.


1844 PCL Reference Manual
Graphics Preferences

shade_color (color_value)

Description:
This function is used to set the color value used for the display of shadows.
Input:
INTEGER color_value This value specifies the color used. See the remarks
below for more information.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.

The input value color_value can have the following values:

Color Value Color Description Color Value Color Description


0 Black 8 Dark Orange
1 Red 9 Light Orange
2 Light Green 10 Dark Green
3 Yellow 11 Green
4 Blue 12 Dark Blue
5 Magenta 13 Light Blue
6 Cyan 14 Light Magenta
7 white 15 Pink

Example:

Please see shade_color.


Chapter 9: Preference Functions 1845
Graphics Preferences

solid_color (color_value)

Description:
This function is used to set the color value used for the display of solid objects.
Input:
INTEGER color_value This value specifies the color used. See the remarks
below for more information.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.

The input value color_value can have the following values:

Color Value Color Description Color Value Color Description


0 Black 8 Dark Orange
1 Red 9 Light Orange
2 Light Green 10 Dark Green
3 Yellow 11 Green
4 Blue 12 Dark Blue
5 Magenta 13 Light Blue
6 Cyan 14 Light Magenta
7 white 15 Pink

Example:

Please see solid_color.


1846 PCL Reference Manual
Graphics Preferences

solid_label (label_status)

Description:
This function sets a status value that indicates if solid labels will be displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that solid labels
will be displayed, and FALSE otherwise.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Example:

Please see solid_label.

surface_color (color_value)

Description:
This function is used to set the color value used for the display of surfaces and surface labels.
Input:
INTEGER color_value This value specifies the color used. See the remarks below for
more information.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Chapter 9: Preference Functions 1847
Graphics Preferences

The input value color_value can have the following values:

Color Value Color Description Color Value Color Description


0 Black 8 Dark Orange
1 Red 9 Light Orange
2 Light Green 10 Dark Green
3 Yellow 11 Green
4 Blue 12 Dark Blue
5 Magenta 13 Light Blue
6 Cyan 14 Light Magenta
7 white 15 Pink

Example:

Please see surface_color.

surface_label (label_status)

Description:
This function sets a status value that indicates if surface labels will be displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that surface labels will be
displayed, and FALSE otherwise.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Example:

Please see surface_label.


1848 PCL Reference Manual
Graphics Preferences

tet_elem_color (color_value)

Description:
This function is used to set the color value used for the display of tetrahedral finite element model entities
and labels.
Input:
INTEGER color_value This value specifies the color used. See the remarks below
for more information.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.

The input value color_value can have the following values:

Color Value Color Description Color Value Color Description


0 Black 8 Dark Orange
1 Red 9 Light Orange
2 Light Green 10 Dark Green
3 Yellow 11 Green
4 Blue 12 Dark Blue
5 Magenta 13 Light Blue
6 Cyan 14 Light Magenta
7 white 15 Pink

Example:

Please see tet_elem_color.


Chapter 9: Preference Functions 1849
Graphics Preferences

tet_elem_label (label_status)

Description:
This function sets a status value that indicates if tetrahedral finite element model entity labels
will be displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that
tetrahedral mesh labels will be displayed, and
FALSE otherwise.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Example:

Please see tet_elem_label.

tri_elem_color (color_value)

Description:
This function is used to set the color value used for the display of triangular finite element
model entities and labels.
Input:
INTEGER color_value This value specifies the color used. See the
remarks below for more information.
Output:
None.
Error Conditions:
None.
1850 PCL Reference Manual
Graphics Preferences

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.

The input value color_value can have the following values:

Color Value Color Description Color Value Color Description


0 Black 8 Dark Orange
1 Red 9 Light Orange
2 Light Green 10 Dark Green
3 Yellow 11 Green
4 Blue 12 Dark Blue
5 Magenta 13 Light Blue
6 Cyan 14 Light Magenta
7 white 15 Pink

Example:

Please see tri_elem_color.

tri_elem_label (label_status)

Description:
This function sets a status value that indicates if triangular finite element model entity labels will be
displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that triangular
mesh labels will be displayed, and FALSE otherwise.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Chapter 9: Preference Functions 1851
Graphics Preferences

Example:

Please see tri_elem_label.

trim_surface_color (color_value)

Description:
This function is used to set the color value used for the display of trimmed surfaces and trimmed
surface labels.
Input:
INTEGER color_value This value specifies the color used. See the remarks
below for more information.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.

The input value color_value can have the following values:

Color Value Color Description Color Value Color Description


0 Black 8 Dark Orange
1 Red 9 Light Orange
2 Light Green 10 Dark Green
3 Yellow 11 Green
4 Blue 12 Dark Blue
5 Magenta 13 Light Blue
6 Cyan 14 Light Magenta
7 white 15 Pink

Example:

Please see trim_surface_color.


1852 PCL Reference Manual
Graphics Preferences

trim_surface_label (label_status)

Description:
This function sets a status value that indicates if trimmed surface labels will be displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that trimmed
surface labels will be displayed, and FALSE
otherwise.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Example:

Please see trim_surface_label.

wedge_elem_color (color_value)

Description:
This function is used to set the color value used for the display of wedge shaped finite element model
entities and labels.
Input:
INTEGER color_value This value specifies the color used. See the remarks
below for more information.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Chapter 9: Preference Functions 1853
Graphics Preferences

The input value color_value can have the following values:


Table 9-1
Color Value Color Description Color Value Color Description
0 Black 8 Dark Orange
1 Red 9 Light Orange
2 Light Green 10 Dark Green
3 Yellow 11 Green
4 Blue 12 Dark Blue
5 Magenta 13 Light Blue
6 Cyan 14 Light Magenta
7 white 15 Pink

Example:

Please see wedge_elem_color.

wedge_elem_label (label_status)

Description:
This function sets a status value that indicates if wedge shaped finite element model entity
labels will be displayed.
Input:
LOGICAL label_status This value specifies, when set to TRUE, that
wedge element labels will be displayed, and
FALSE otherwise.
Output:
None.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the
“Entity/Color/Label/Render...” selection is picked from the “Display” pull down menu.
Example:

Please see wedge_elem_label.


1854 PCL Reference Manual
Report Preferences

Report Preferences
This section is used to describe some of the functions used to govern some of the preferences used to
control the generation of reports.

pref_report_get (real_numbers, float_field_width, float_decimal,


sci_field_width, sci_decimal, integer_field_width,
number_spacing)

Description:
This function gets the parameters used to format tabular textual results reports.
Input:
None.
Output:
INTEGER real_numbers This value returns the real number switch status.
INTEGER float_field_width This value returns the field width used for listing
floating point numbers.
INTEGER float_decimal This value returns the number of values shown after
the decimal point of a floating point number.
INTEGER sci_field_width This value returns the field width used to list
numbers in scientific notation.
INTEGER sci_decimal This value returns the number of values shown after
the decimal point of a number in scientific notation.
INTEGER integer_field_width This value returns the field width used to list
integers.
INTEGER number_spacing This value specifies the number of spaces placed
between numerical fields.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a
change in status or an error.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the “Report...” selection is picked
from the “Preferences” pull down menu.

Example:

Please see pref_report_get.


Chapter 9: Preference Functions 1855
Report Preferences

pref_report_set (real_numbers, float_field_width,


float_decimal, sci_field_width,
sci_decimal, integer_field_width,
number_spacing)

Description:
This function sets the parameters used to format tabular textual results reports.
Input:
INTEGER real_numbers This value specifies the real number switch
status. The floating point format will be used if
this value is set to 1 and the scientific notation
format will be used if this value is set to 2.
INTEGER float_field_width This value specifies the field width used for
listing floating point numbers. This value can
range from 3 to 12.
INTEGER float_decimal This value specifies the number of values
shown after the decimal point of a floating point
number. This value can range from 0 to 11.
INTEGER sci_field_width This value specifies the field width used to list
numbers in scientific notation. This value can
range from 6 to 12.
INTEGER sci_decimal This value specifies the number of values
shown after the decimal point of a number in
scientific notation. This value can range from 1
to 7.
INTEGER integer_field_width This value returns the field width used to list
integers. This value can range from 1 to 12.
INTEGER number_spacing This value specifies the number of spaces
placed between numerical fields. This value can
range from 1 to 20.
Output:
INTEGER <Return Value> This function returns a value of 0 when
executed successfully and a non zero value to
indicate a change in status or an error.
Error Conditions:
None.
1856 PCL Reference Manual
Report Preferences

Remarks:

This function is used in the implementation of the form displayed when the “Report...” selection is picked
from the “Preferences” pull down menu.
Example:

Please see pref_report_set.


Chapter 9: Preference Functions 1857
Geometry Preferences

Geometry Preferences
This section is used to describe some of the functions used to govern some of the preferences used to
define how geometry is interpreted.

pref_geometry_get_v1 (hpat_parametrization, nurbs_acceleration,


geometry_convention)

Description:
This function gets the geometric preference values in the database.
Input:
None.
Output:
LOGICAL hpat_parametrization This value returns a status setting used to select the
parameter convention for hyperpatches. When this value
is set to TRUE, hyperpatches will not necessarily use the
same parameters as used with Patran 2.5. When this value

is set to FALSE it indicates that the Patran convention


will be used with solid origin locations.
LOGICAL nurbs_acceleration This value returns a status setting used to select, when set
to TRUE, that nurbs curves and surfaces will be evaluated
using specially designed evaluators which are optimized
for speed. These optimized evaluators should not be used
with higher order curves and surfaces as they tend to be
unstable under those conditions. When this value is set to
FALSE another kind of evaluator is used, one that is
stable under all conditions.
LOGICAL geometry_convention This value returns a status setting used to select, when set
to TRUE, that geometry will be represented using the
Patran 2.5 convention. When this value is set to FALSE,

the Patran convention will be used.


INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
None.
1858 PCL Reference Manual
Geometry Preferences

Remarks:

This function is used in the implementation of the form displayed when the “Report...” selection is picked
from the “Preferences” pull down menu.

Example:

Please see pref_geometry_get_v1.


Chapter 9: Preference Functions 1859
Geometry Preferences

pref_geometry_set_v1 (hpat_parametrization,
nurbs_acceleration,
geometry_convention)

Description:
This function sets the geometric preference values in the database.
Input:
LOGICAL hpat_parametrization This value specifies, when set to TRUE, that hyperpatches
will not necessarily use the same parameters as used with
Patran 2.5. Setting this value to TRUE will indicate that
the Patran convention will be used with solid origin
locations. Setting this value to FALSE will ensure
compatibility with models created using Patran 2.5.
LOGICAL nurbs_acceleration This value specifies, when set to TRUE, that nurbs curves
and surfaces will be evaluated using specially designed
evaluators which are optimized for speed. These
optimized evaluators should not be used with higher order
curves and surfaces as they tend to be unstable under those
conditions. When this value is set to FALSE another kind
of evaluator is used, one that is stable under all conditions.
LOGICAL geometry_convention This value specifies, when set to TRUE, that geometry
will be represented using the Patran 2.5 convention.
Setting this value to TRUE will ensure compatibility with
models created using Patran 2.5. When this value is set to
FALSE, the Patran convention will be used.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the “Report...” selection is picked
from the “Preferences” pull down menu.
Example:
1860 PCL Reference Manual
Geometry Preferences

Please see pref_geometry_set_v1.


Chapter 9: Preference Functions 1861
Finite Element Preferences

Finite Element Preferences


This section is used to describe some of the functions used to govern some of the preferences used with
finite element model elements.

pref_fem_get (minimum_angle)

Description:
This function gets the finite element model minimum angle value from the database.
Input:
Output:
REAL mininimum_angle The value returns the mesh/edges snap angle in degrees.
This angle controls the automatic snapping of nodes to
geometry edge slope discontinuities during seeding,
meshing and sweeping operations. These operations will
place nodes at all edge slope discontinuities greater than
the angle returned by this value.
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
None.

Remarks:

This function is used in the implementation of the form displayed when the “Finite Element...” selection
is picked from the “Preferences” pull down menu.
Example:

Please see pref_fem_get.


1862 PCL Reference Manual
Finite Element Preferences

pref_fem_set (minimum_angle)

Description:
This function sets the finite element model minimum angle value in the database.
Input:
REAL mininimum_angle The value specifies the mesh/edges snap angle in
degrees. This angle controls the automatic snapping of
nodes to geometry edge slope discontinuities during
seeding, meshing and sweeping operations. These
operations will place nodes at all edge slope
discontinuities greater than the angle specified by this
value.
Output:
INTEGER <Return Value> This function returns a value of 0 when executed
successfully and a non zero value to indicate a change in
status or an error.
Error Conditions:
None.

Remarks:

If changing the input value minimum_angle changes the number of locations requiring nodes on any edge
with a mesh seed, a popup form will be used to request permission to adjust the seed locations on that
edge unless the number of locations requiring nodes changes to zero. If the number of locations requiring
nodes changes to zero, the existing seeds will not be modified.
This function is used in the implementation of the form displayed when the “Finite Element...” selection
is picked from the “Preferences” pull down menu.
Example:

Please see pref_fem_set.

You might also like