() |
#
# 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 Declarations
STRING s_location[16]
STRING s_register_type[16]
INTEGER i_return_value
#---------------------------------------------------------------------
# Opens the file spool.db
uil_file_open.go ("spool.db")
#---------------------------------------------------------------------
# Defines register 1
i_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 initialization
s_location = "Nodal"
s_register_type = "Scalar"
#---------------------------------------------------------------------
# Gets the unused register identifier
i_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 Declarations
INTEGER i_register
STRING s_location[16]
STRING s_register_type[16]
INTEGER i_return_value
LOGICAL l_return_value
#---------------------------------------------------------------------
# Opens the file spool.db
uil_file_open.go ("spool.db")
#---------------------------------------------------------------------
# Argument initialization
i_register = 1
s_location = "Nodal"
s_register_type = "Scalar"
#---------------------------------------------------------------------
# Checks whether register is defined or not
l_return_value = @
res_data_defined @
( i_register, @
s_location, @
s_register_type )
dump l_return_value
#---------------------------------------------------------------------
# Defining a register
i_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 not
l_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 Declarations
INTEGER i_register
STRING 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.db
uil_file_open.go ("spool.db")
#---------------------------------------------------------------------
# Defining a register
i_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 initialization
i_register = 1
s_location = "Nodal"
s_register_type= "Scalar"
s_file_name = "register"
s_file_options = "WRN"
#---------------------------------------------------------------------
# Writing data to a file
i_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 Declarations
STRING s_file_name[16]
STRING s_file_options[16]
INTEGER i_return_value
#---------------------------------------------------------------------
# Opens the file spool.db
uil_file_open.go ("spool.db")
#---------------------------------------------------------------------
# Defining the registers
i_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_value
i_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_value
i_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 initialization
s_file_name = "coordinate"
s_file_options = "NW"
#---------------------------------------------------------------------
# Writes information to the file
i_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 Declarations
STRING s_file_name[16]
STRING s_file_options[16]
INTEGER i_return_value
#---------------------------------------------------------------------
# Opens the file spool.db
uil_file_open.go ("spool.db")
#---------------------------------------------------------------------
# Defining a register
i_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_value
i_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_value
i_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 initialization
s_file_name = "pattern"
s_file_options = "NW"
#---------------------------------------------------------------------
# Writes information to the file
i_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 Declarations
INTEGER i_register
STRING s_location[16]
STRING s_register_type[16]
STRING s_source_type[16]
INTEGER i_return_value
#---------------------------------------------------------------------
# Opens the file spool.db
uil_file_open.go ("spool.db")
#---------------------------------------------------------------------
# Defining a register
i_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 initialization
i_register = 1
s_location = "Nodal"
s_register_type = "Scalar"
#---------------------------------------------------------------------
# Gets the source type
i_return_value = @
res_data_get_source_type @
( i_register, @
s_location, @
s_register_type, @
s_source_type )
dump i_return_value
dump 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 Declarations
INTEGER i_register
STRING 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_flag
LOGICAL l_layer_flag
STRING s_data_form[16]
REAL r_complex_angle
INTEGER i_return_value
#---------------------------------------------------------------------
# Opens the file spool.db
uil_file_open.go ("spool.db")
#---------------------------------------------------------------------
# Defining a register
i_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 initialization
i_register = 1
s_location = "Nodal"
s_register_type = "Scalar"
#---------------------------------------------------------------------
# Gets information regarding register
i_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_value
dump s_load_case
dump s_subcase
dump s_primary_result
dump s_secondary_result
dump s_layer
dump s_derivation
dump s_coordinate
dump s_average_method
dump s_average_domain
dump s_extrapolation
dump l_list_flag
dump l_layer_flag
dump s_data_form
dump 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 Declarations
INTEGER i_load_case
INTEGER i_subcase
STRING s_subcase_name[32]
INTEGER i_return_value
#---------------------------------------------------------------------
# Opens the file spool.db
uil_file_open.go ("spool.db")
#---------------------------------------------------------------------
# Argument initialization
i_load_case = 4
i_subcase = 2
#---------------------------------------------------------------------
# Gets the name of subcase
i_return_value = @
res_data_get_subcase_name @
( i_load_case, @
i_subcase, @
s_subcase_name )
dump i_return_value
dump 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 Declarations
STRING s_load_case[32]
STRING s_subcase[32]
INTEGER i_subcase_id
INTEGER i_return_value
#---------------------------------------------------------------------
# Opens the file spool.db
uil_file_open.go ("spool.db")
#---------------------------------------------------------------------
# Argument initialization
s_load_case = "SPOOL_LOADS"
s_subcase = "Static Subcase"
#---------------------------------------------------------------------
# Gets the subcase id
i_return_value = @
res_data_get_subcase_id @
( s_load_case, @
s_subcase, @
i_subcase_id )
dump i_return_value
dump 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 Declarations
INTEGER i_primary_result
INTEGER i_secondary_result
STRING s_primary_name[32]
STRING s_secondary_name[32]
INTEGER i_return_value
#---------------------------------------------------------------------
# Opens the file spool.db
uil_file_open.go ("spool.db")
#---------------------------------------------------------------------
# Argument initialization
i_primary_result = 2
i_secondary_result = 1
#---------------------------------------------------------------------
# Gets the names of result
i_return_value = @
res_data_get_result_names @
( i_primary_result, @
i_secondary_result, @
s_primary_name, @
s_secondary_name )
dump i_return_value
dump s_primary_name
dump 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 Declarations
STRING s_primary_name[32]
STRING s_secondary_name[32]
INTEGER i_primary_result
INTEGER i_secondary_result
INTEGER i_return_value
#---------------------------------------------------------------------
# Opens the file spool.db
uil_file_open.go ("spool.db")
#---------------------------------------------------------------------
# Argument initialization
s_primary_name = "Displacements"
s_secondary_name = "Translational"
#---------------------------------------------------------------------
# Gets the result ids
i_return_value = @
res_data_get_result_ids @
( s_primary_name, @
s_secondary_name, @
i_primary_result, @
i_secondary_result )
dump i_return_value
dump i_primary_result
dump 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 Declarations
INTEGER i_layer_id
STRING s_layer_name[32]
INTEGER i_return_value
#---------------------------------------------------------------------
# Opens the file spool.db
uil_file_open.go ("spool.db")
#---------------------------------------------------------------------
# Argument initialization
i_layer_id = 2
#---------------------------------------------------------------------
# Gets the name of layer position
i_return_value = @
res_data_get_layerpos_name @
( i_layer_id, @
s_layer_name )
dump i_return_value
dump 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 Declarations
STRING s_layer_name[32]
INTEGER i_layer_id
INTEGER i_return_value
#---------------------------------------------------------------------
# Opens the file spool.db
uil_file_open.go ("spool.db")
#---------------------------------------------------------------------
# Argument initialization
s_layer_name = "At Z1"
#---------------------------------------------------------------------
# Gets the layer id
i_return_value = @
res_data_get_layerpos_id @
( s_layer_name, @
i_layer_id )
dump i_return_value
dump 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 Declarations
INTEGER i_count
INTEGER 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.db
uil_file_open.go ("spool.db")
#---------------------------------------------------------------------
# Gets the information regarding loadcases and coordinate ids
i_return_value = @
res_data_bulk_get_loadcases @
( i_count, @
ia_load_case_ids, @
ia_subcase_ids, @
ia_coordinates, @
sa_load_case )
dump i_return_value
dump i_count
dump ia_load_case_ids
dump ia_subcase_ids
dump ia_coordinates
dump 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 Declarations
INTEGER i_restype_id
INTEGER i_primary_result
INTEGER i_secondary_result
INTEGER i_return_value
#---------------------------------------------------------------------
# Opens the file spool.db
uil_file_open.go ("spool.db")
#---------------------------------------------------------------------
# Argument initialization
i_restype_id = 2
#---------------------------------------------------------------------
# Gets the result ids
i_return_value = @
res_data_get_restype_ids @
( i_restype_id, @
i_primary_result, @
i_secondary_result )
dump i_return_value
dump i_primary_result
dump i_secondary_result
#---------------------------------------------------------------------