PCL Examples > Preference Functions > Analysis Preferences
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Analysis Preferences
This section contains examples of some of the functions used to govern some of the preferences used with the analysis of a model.
 
()
#
#  Purpose          :  This file provides an example of a call to the
#                      function uil_pref_analysis.set_analysis_pref()
#
#                      This illustration opens a new database and gets
#                      the analysis preference of the current database
#                      Then it changes the analysis preferences and
#                      gets it again.
#
#                      This file can be run by starting a session of
#                      Patran and running this session file
#                      through the "File","Session","Play" pulldown
#                      menus on the menu bar.
#
#  The function uil_pref_analysis.set_analysis_pref()
#  has the following arguments:
#
#  uil_pref_analysis.set_analysis_pref
#     (  analysis_code,
#        analysis_type,
#        input_file_suffix,
#        output_file_suffix )
#
#---------------------------------------------------------------------
#  Variable Declarations
STRING   s_analysis_code[128]
STRING   s_analysis_type[128]
STRING   s_input_file_suffix[128]
STRING   s_output_file_suffix[128]
INTEGER  i_return_value
#---------------------------------------------------------------------
#  Open a new database
uil_file_new.go( "", "./new.db" )
$? YES 36000002
 
#  Get the current analysis type and code with input and output 
#  file suffix.
i_return_value =                                 @
   pref_anal_get                                 @
      (  s_analysis_code,                        @
         s_analysis_type,                        @
         s_input_file_suffix,                    @
         s_output_file_suffix  )
 
dump i_return_value
dump s_analysis_code, s_analysis_type
dump s_input_file_suffix, s_output_file_suffix
#---------------------------------------------------------------------
#  Change the input and output file suffix.
s_input_file_suffix = "inp"
s_output_file_suffix = "otp"
 
uil_pref_analysis.set_analysis_pref              @
   (  s_analysis_code,                           @
      s_analysis_type,                           @
      s_input_file_suffix,                       @
      s_output_file_suffix )
#---------------------------------------------------------------------
#  Get the current analysis type and code with input and output 
#  file suffix.
i_return_value =                                 @
   pref_anal_get                                 @
      (  s_analysis_code,                        @
         s_analysis_type,                        @
         s_input_file_suffix,                    @
         s_output_file_suffix  )
 
dump i_return_value
dump s_analysis_code, s_analysis_type
dump s_input_file_suffix, s_output_file_suffix
#---------------------------------------------------------------------