() |
## Purpose : This file provides an example of a call to the# function res_data_next()## This session file returns the next available # unused register identifier of the specified # location and type.## Before running this session file run spool.ses# and create result file spool.op2 as per the# instructions given in it. Import this result# file spool.op2 into spool.db. For instructions# see file spool.ses## 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 res_data_next()# has the following arguments:## res_data_next# ( location,# register_type )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_location[16]STRING s_register_type[16]INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Defines register 1i_return_value = @ res_data_load_dbresult( 1, "Nodal", "Scalar", @ "SPOOL_LOADS", "Static Subcase", @ "Displacements", "Translational", @ "(NON-LAYERED)", "MAG", "Default", @ "DeriveAverage", "All", "ShapeFunc" )dump i_return_value#---------------------------------------------------------------------# Argument initializations_location = "Nodal"s_register_type = "Scalar"#---------------------------------------------------------------------# Gets the unused register identifieri_return_value = @ res_data_next @ ( s_location, @ s_register_type )dump i_return_value# This value shows next available unused register identifier#---------------------------------------------------------------------() |
## Purpose : This file provides an example of 2 calls to the# function res_data_defined()## This session file returns logical value # depending on whether register has been defined # or not. ## Before running this session file run spool.ses# and create result file spool.op2 as per the# instructions given in it. Import this result# file spool.op2 into spool.db. For instructions# see file spool.ses## 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 res_data_defined()# has the following arguments:## res_data_defined# ( register,# location,# register_type )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_registerSTRING s_location[16]STRING s_register_type[16]INTEGER i_return_valueLOGICAL l_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationi_register = 1s_location = "Nodal"s_register_type = "Scalar"#---------------------------------------------------------------------# Checks whether register is defined or notl_return_value = @ res_data_defined @ ( i_register, @ s_location, @ s_register_type )dump l_return_value#---------------------------------------------------------------------# Defining a registeri_return_value = @ res_data_load_dbresult( 1, "Nodal", "Scalar", @ "SPOOL_LOADS", "Static Subcase", @ "Stress Tensor", "", "At Z1", "VONM", @ "Default", "DeriveAverage", "All", "ShapeFunc" )dump i_return_value#---------------------------------------------------------------------# Checks whether register is defined or notl_return_value = @ res_data_defined @ ( i_register, @ s_location, @ s_register_type )dump l_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_data_dump()## This session file dumps the data of the # specified register to a file "register".# File can be seen in any text editor.## Before running this session file run spool.ses# and create result file spool.op2 as per the# instructions given in it. Import this result# file spool.op2 into spool.db. For instructions# see file spool.ses## 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 res_data_dump()# has the following arguments:## res_data_dump# ( register,# location,# register_type,# file_name,# file_options )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_registerSTRING s_location[16]STRING s_register_type[16]STRING s_file_name[16]STRING s_file_options[16]INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Defining a registeri_return_value = @ res_data_load_dbresult( 1, "Nodal", "Scalar", @ "SPOOL_LOADS", "Static Subcase", @ "Stress Tensor", "", "At Z1", "VONM", @ "Default", "DeriveAverage", "All", "ShapeFunc" )dump i_return_value#---------------------------------------------------------------------# Argument initializationi_register = 1s_location = "Nodal"s_register_type= "Scalar"s_file_name = "register"s_file_options = "WRN"#---------------------------------------------------------------------# Writing data to a filei_return_value = @ res_data_dump @ ( i_register, @ s_location, @ s_register_type, @ s_file_name, @ s_file_options )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_data_csys_dump()## This session file dumps the coordinate system # information to a file "coordinate.1" from all # defined registers. File can be seen in any text# editor.## Before running this session file run spool.ses# and create result file spool.op2 as per the# instructions given in it. Import this result# file spool.op2 into spool.db. For instructions# see file spool.ses## 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 res_data_csys_dump()# has the following arguments:## res_data_csys_dump# ( file_name,# file_options )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_file_name[16]STRING s_file_options[16]INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Defining the registersi_return_value = @ res_data_load_dbresult( 1, "Nodal", "Scalar", @ "SPOOL_LOADS", "Static Subcase", @ "Stress Tensor", "", "At Z1", "VONM", @ "Coord 1", "DeriveAverage", "All", "ShapeFunc" )dump i_return_valuei_return_value = @ res_data_load_dbresult( 2, "Nodal", "Scalar", @ "SPOOL_LOADS", "Static Subcase", @ "Displacements", "Translational", @ "(NON-LAYERED)", "MAG", "Coord 0", @ "DeriveAverage", "All", "ShapeFunc" )dump i_return_valuei_return_value = @ res_data_load_dbresult( 3, "Nodal", "Scalar", @ "SPOOL_LOADS", "Static Subcase", @ "Constraint Forces", "Translational", @ "(NON-LAYERED)", "MAG", "Coord 1", @ "DeriveAverage", "All", "ShapeFunc" )dump i_return_value#---------------------------------------------------------------------# Argument initializations_file_name = "coordinate"s_file_options = "NW"#---------------------------------------------------------------------# Writes information to the filei_return_value = @ res_data_csys_dump @ ( s_file_name, @ s_file_options )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_data_pattern_dump()## This session file dumps the register data# pattern information to a file "pattern.1" # from all defined registers. File can be seen # in any text editor## Before running this session file run spool.ses# and create result file spool.op2 as per the# instructions given in it. Import this result# file spool.op2 into spool.db. For instructions# see file spool.ses## 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 res_data_pattern_dump()# has the following arguments:## res_data_pattern_dump# ( file_name,# file_options )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_file_name[16]STRING s_file_options[16]INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Defining a registeri_return_value = @ res_data_load_dbresult( 1, "Nodal", "Scalar", @ "SPOOL_LOADS", "Static Subcase", @ "Stress Tensor", "", "At Z1", "VONM", @ "Coord 1", "DeriveAverage", "All", "ShapeFunc" )dump i_return_valuei_return_value = @ res_data_load_dbresult( 2, "Nodal", "Scalar", @ "SPOOL_LOADS", "Static Subcase", @ "Displacements", "Translational", @ "(NON-LAYERED)", "MAG", "Coord 0", @ "DeriveAverage", "All", "ShapeFunc" )dump i_return_valuei_return_value = @ res_data_load_dbresult( 3, "Nodal", "Scalar", @ "SPOOL_LOADS", "Static Subcase", @ "Constraint Forces", "Translational", @ "(NON-LAYERED)", "MAG", "Coord 1", @ "DeriveAverage", "All", "ShapeFunc" )dump i_return_value#---------------------------------------------------------------------# Argument initializations_file_name = "pattern"s_file_options = "NW"#---------------------------------------------------------------------# Writes information to the filei_return_value = @ res_data_pattern_dump @ ( s_file_name, @ s_file_options )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_data_get_source_type()## This session file returns the registers data # source type.## Before running this session file run spool.ses# and create result file spool.op2 as per the# instructions given in it. Import this result# file spool.op2 into spool.db. For instructions# see file spool.ses## 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 res_data_get_source_type()# has the following arguments:## res_data_get_source_type# ( register,# location,# register_type,# source_type )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_registerSTRING s_location[16]STRING s_register_type[16]STRING s_source_type[16]INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Defining a registeri_return_value = @ res_data_load_dbresult( 1, "Nodal", "Scalar", @ "SPOOL_LOADS", "Static Subcase", @ "Stress Tensor", "", "At Z1", "VONM", @ "Default", "DeriveAverage", "All", "ShapeFunc" )dump i_return_value#---------------------------------------------------------------------# Argument initializationi_register = 1s_location = "Nodal"s_register_type = "Scalar"#---------------------------------------------------------------------# Gets the source typei_return_value = @ res_data_get_source_type @ ( i_register, @ s_location, @ s_register_type, @ s_source_type )dump i_return_valuedump s_source_type#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_data_get_dbresult()## This session file returns the stored # information regarding a register containing a# database result.## Before running this session file run spool.ses# and create result file spool.op2 as per the# instructions given in it. Import this result# file spool.op2 into spool.db. For instructions# see file spool.ses## 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 res_data_get_dbresult()# has the following arguments:## res_data_get_dbresult# ( register,# location,# register_type,# load_case,# subcase,# primary_result,# secondary_result,# layer,# derivation,# coordinate,# average_method,# average_domain,# extrapolation,# list_flag,# layer_flag,# data_form,# complex_angle )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_registerSTRING s_location[16]STRING s_register_type[16]STRING s_load_case[32]STRING s_subcase[32]STRING s_primary_result[32]STRING s_secondary_result[32]STRING s_layer[32]STRING s_derivation[16]STRING s_coordinate[16]STRING s_average_method[16]STRING s_average_domain[16]STRING s_extrapolation[16]LOGICAL l_list_flagLOGICAL l_layer_flagSTRING s_data_form[16]REAL r_complex_angleINTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Defining a registeri_return_value = @ res_data_load_dbresult( 1, "Nodal", "Scalar", @ "SPOOL_LOADS", "Static Subcase", @ "Stress Tensor", "", "At Z1", "VONM", @ "Default", "DeriveAverage", "All", "ShapeFunc" )dump i_return_value#---------------------------------------------------------------------# Argument initializationi_register = 1s_location = "Nodal"s_register_type = "Scalar"#---------------------------------------------------------------------# Gets information regarding registeri_return_value = @ res_data_get_dbresult @ ( i_register, @ s_location, @ s_register_type, @ s_load_case, @ s_subcase, @ s_primary_result, @ s_secondary_result, @ s_layer, @ s_derivation, @ s_coordinate, @ s_average_method, @ s_average_domain, @ s_extrapolation, @ l_list_flag, @ l_layer_flag, @ s_data_form, @ r_complex_angle )dump i_return_valuedump s_load_casedump s_subcasedump s_primary_resultdump s_secondary_resultdump s_layerdump s_derivationdump s_coordinatedump s_average_methoddump s_average_domaindump s_extrapolationdump l_list_flagdump l_layer_flagdump s_data_formdump r_complex_angle#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_data_get_subcase_name()## This session file returns the name of the # subcase related to the specified loadcase.## Before running this session file run spool.ses# and create result file spool.op2 as per the# instructions given in it. Import this result# file spool.op2 into spool.db. For instructions# see file spool.ses## 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 res_data_get_subcase_name()# has the following arguments:## res_data_get_subcase_name# ( load_case,# subcase,# subcase_name )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_load_caseINTEGER i_subcaseSTRING s_subcase_name[32]INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationi_load_case = 4i_subcase = 2#---------------------------------------------------------------------# Gets the name of subcasei_return_value = @ res_data_get_subcase_name @ ( i_load_case, @ i_subcase, @ s_subcase_name )dump i_return_valuedump s_subcase_name#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_data_get_subcase_id()## This session file returns the subcase # identifier related to the specified loadcase.## Before running this session file run spool.ses# and create result file spool.op2 as per the# instructions given in it. Import this result# file spool.op2 into spool.db. For instructions# see file spool.ses## 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 res_data_get_subcase_id()# has the following arguments:## res_data_get_subcase_id# ( load_case,# subcase,# subcase_id )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_load_case[32]STRING s_subcase[32]INTEGER i_subcase_idINTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializations_load_case = "SPOOL_LOADS"s_subcase = "Static Subcase"#---------------------------------------------------------------------# Gets the subcase idi_return_value = @ res_data_get_subcase_id @ ( s_load_case, @ s_subcase, @ i_subcase_id )dump i_return_valuedump i_subcase_id#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_data_get_result_names()## This session file returns the primary and # secondary result names.## Before running this session file run spool.ses# and create result file spool.op2 as per the# instructions given in it. Import this result# file spool.op2 into spool.db. For instructions# see file spool.ses## 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 res_data_get_result_names()# has the following arguments:## res_data_get_result_names# ( primary_result,# secondary_result,# primary_name,# secondary_name )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_primary_resultINTEGER i_secondary_resultSTRING s_primary_name[32]STRING s_secondary_name[32]INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationi_primary_result = 2i_secondary_result = 1#---------------------------------------------------------------------# Gets the names of resulti_return_value = @ res_data_get_result_names @ ( i_primary_result, @ i_secondary_result, @ s_primary_name, @ s_secondary_name )dump i_return_valuedump s_primary_namedump s_secondary_name#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_data_get_result_ids()## This session file returns the primary and # secondary result identifiers.## Before running this session file run spool.ses# and create result file spool.op2 as per the# instructions given in it. Import this result# file spool.op2 into spool.db. For instructions# see file spool.ses## 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 res_data_get_result_ids()# has the following arguments:## res_data_get_result_ids# ( primary_name,# secondary_name,# primary_result,# secondary_result )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_primary_name[32]STRING s_secondary_name[32]INTEGER i_primary_resultINTEGER i_secondary_resultINTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializations_primary_name = "Displacements"s_secondary_name = "Translational"#---------------------------------------------------------------------# Gets the result idsi_return_value = @ res_data_get_result_ids @ ( s_primary_name, @ s_secondary_name, @ i_primary_result, @ i_secondary_result )dump i_return_valuedump i_primary_resultdump i_secondary_result#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_data_get_layerpos_name()## This session file returns the name of the layer# position.## Before running this session file run spool.ses# and create result file spool.op2 as per the# instructions given in it. Import this result# file spool.op2 into spool.db. For instructions# see file spool.ses## 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 res_data_get_layerpos_name()# has the following arguments:## res_data_get_layerpos_name# ( layer_id,# layer_name )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_layer_idSTRING s_layer_name[32]INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationi_layer_id = 2#---------------------------------------------------------------------# Gets the name of layer positioni_return_value = @ res_data_get_layerpos_name @ ( i_layer_id, @ s_layer_name )dump i_return_valuedump s_layer_name#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_data_get_layerpos_id()## This session file returns the layer position # identifier.## Before running this session file run spool.ses# and create result file spool.op2 as per the# instructions given in it. Import this result# file spool.op2 into spool.db. For instructions# see file spool.ses## 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 res_data_get_layerpos_id()# has the following arguments:## res_data_get_layerpos_id# ( layer_name,# layer_id )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_layer_name[32]INTEGER i_layer_idINTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializations_layer_name = "At Z1"#---------------------------------------------------------------------# Gets the layer idi_return_value = @ res_data_get_layerpos_id @ ( s_layer_name, @ i_layer_id )dump i_return_valuedump i_layer_id#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_data_bulk_get_loadcases()## This session file extracts information # regarding loadcases and coordinate ids from # the database. ## Before running this session file run spool.ses# and create result file spool.op2 as per the# instructions given in it. Import this result# file spool.op2 into spool.db. For instructions# see file spool.ses## 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 res_data_bulk_get_loadcases()# has the following arguments:## res_data_bulk_get_loadcases# ( count,# load_case_ids,# subcase_ids,# coordinates,# load_case )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_countINTEGER ia_load_case_ids(4)INTEGER ia_subcase_ids(4)INTEGER ia_coordinates(4)STRING sa_load_case[32](4)INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Gets the information regarding loadcases and coordinate idsi_return_value = @ res_data_bulk_get_loadcases @ ( i_count, @ ia_load_case_ids, @ ia_subcase_ids, @ ia_coordinates, @ sa_load_case )dump i_return_valuedump i_countdump ia_load_case_idsdump ia_subcase_idsdump ia_coordinatesdump sa_load_case#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_data_get_restype_ids()## This session file returns the primary and # secondary result ids.## Before running this session file run spool.ses# and create result file spool.op2 as per the# instructions given in it. Import this result# file spool.op2 into spool.db. For instructions# see file spool.ses## 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 res_data_get_restype_ids()# has the following arguments:## res_data_get_restype_ids# ( restype_id,# primary_result,# secondary_result )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_restype_idINTEGER i_primary_resultINTEGER i_secondary_resultINTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationi_restype_id = 2#---------------------------------------------------------------------# Gets the result idsi_return_value = @ res_data_get_restype_ids @ ( i_restype_id, @ i_primary_result, @ i_secondary_result )dump i_return_valuedump i_primary_resultdump i_secondary_result#---------------------------------------------------------------------