() |
## Purpose : This file provides an example of a call to the# function res_utl_extract_elem_pos_ids()## This session file extracts the internal element# position id for the specified element.## 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_utl_extract_elem_pos_ids()# has the following arguments:## res_utl_extract_elem_pos_ids# ( res_ids,# elem_list,# count,# ids,# npos,# posids )##---------------------------------------------------------------------# Variable DeclarationsINTEGER ia_res_ids(5)STRING s_elem_list[10]INTEGER i_countINTEGER iv_ids(VIRTUAL)INTEGER iv_npos(VIRTUAL)INTEGER iv_posids(VIRTUAL)INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#--------------------------------------------------------------------# Argument initializationia_res_ids = [3, 1, 2, 1, 1]s_elem_list = "Elem 77"#---------------------------------------------------------------------# Extract the result data for one elementi_return_value = @ res_utl_extract_elem_pos_ids @ ( ia_res_ids, @ s_elem_list, @ i_count, @ iv_ids, @ iv_npos, @ iv_posids )dump i_return_valuedump i_count# This value shows the number of elements dump iv_ids# This shows list of element idsdump iv_npos# This shows the number of element positions per elementdump iv_posids# This shows element position ids for the specified elementssys_free_array(iv_ids)sys_free_array(iv_npos)sys_free_array(iv_posids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_get_elem_pos_loc()## This session file extracts specified results # from the database. It gives XYZ coordinates of# node belonging to specific element.## 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_utl_get_elem_pos_loc()# has the following arguments:## res_utl_get_elem_pos_loc# ( elem_id,# param_flag,# epos_id,# location )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_elem_idINTEGER i_param_flagINTEGER i_epos_idREAL ra_location(4)INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationi_elem_id = 100i_param_flag = 0i_epos_id = 2 #---------------------------------------------------------------------# Extract element position location for an elementi_return_value = @ res_utl_get_elem_pos_loc @ ( i_elem_id, @ i_param_flag, @ i_epos_id, @ ra_location )dump i_return_valuedump ra_location# These are the XYZ coordinates of the 2nd node of element 100.#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_get_result_info()## This session file extracts information about# the specified results from the database. It# gives title, number and type of results etc.## 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_utl_get_result_info()# has the following arguments:## res_utl_get_result_info# ( res_ids,# title,# nres,# datatype,# assoc,# resloc,# cidflag,# minloc,# maxloc )##---------------------------------------------------------------------# Variable DeclarationsINTEGER ia_res_ids(5)STRING sa_title[80](3)INTEGER i_nresINTEGER i_datatypeINTEGER i_assocINTEGER i_reslocLOGICAL l_cidflagINTEGER iaa_minloc(2,6)INTEGER iaa_maxloc(2,6)INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationia_res_ids = [3, 1, 2, 1, 1]#---------------------------------------------------------------------# Extract information about the specified result casei_return_value = @ res_utl_get_result_info @ ( ia_res_ids, @ sa_title, @ i_nres, @ i_datatype, @ i_assoc, @ i_resloc, @ l_cidflag, @ iaa_minloc, @ iaa_maxloc )dump i_return_valuedump sa_title# This shows title of the resultdump i_nres# This shows total number of resultsdump i_datatype# This value shows that results are associated with vector dump i_assoc# This value shows that results are associated with nodesdump i_resloc# This value shows the result locationdump l_cidflag# This shows that results are defined in non-global systemdump iaa_minloc# This shows id and location for each minimum result componentdump iaa_maxloc# This shows id and location for each maximum result component#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_clear_result()## This session file clears previously used# results from memory.# # 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_utl_clear_result() has no arguments.##---------------------------------------------------------------------# Variable DeclarationsINTEGER ia_res_ids(5)INTEGER i_typeINTEGER i_nidsINTEGER ia_ids(1)INTEGER ia_cids(1)INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationia_res_ids = [3, 1, 2, 1, 1]i_type = 1 i_nids = 1ia_ids = [100]#---------------------------------------------------------------------# Clear any previous results from the memoryi_return_value = @ res_utl_clear_result()dump i_return_value#---------------------------------------------------------------------# Extract cids for the specified nodesi_return_value = @ res_utl_get_results_cids @ ( ia_res_ids, i_type, i_nids, ia_ids, ia_cids )dump i_return_valuedump ia_cids#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_get_result_entities()## This session file extracts specified results# from the database. It gives the list of ids for# which specified result exists.## 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_utl_get_result_entities()# has the following arguments:## res_utl_get_result_entities# ( res_ids,# id_list )##---------------------------------------------------------------------# Variable DeclarationsINTEGER ia_res_ids(5)STRING sv_id_list[VIRTUAL]INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationia_res_ids = [3, 1, 2, 1, 1]#---------------------------------------------------------------------# Gets the result entitiesi_return_value = @ res_utl_get_result_entities @ ( ia_res_ids, @ sv_id_list )dump i_return_valuedump sv_id_list# This shows the list of ids for which specified results existssys_free_string(sv_id_list)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_get_result_type()## This session file extracts specified results# from the database. It returns a value # which shows the type of result i.e. scaler,# vector or tensor.# # 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_utl_get_result_type()# has the following arguments:## res_utl_get_result_type# ( res_ids,# type )##---------------------------------------------------------------------# Variable DeclarationsINTEGER ia_res_ids(5)INTEGER i_typeINTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationia_res_ids = [3, 1, 2, 1, 1]#---------------------------------------------------------------------# Extract the tupe of resulti_return_value = @ res_utl_get_result_type @ ( ia_res_ids, @ i_type )dump i_return_valuedump i_type# This value shows type of result, 1 = scaler, 2 = vector 3 = tensor.#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_get_result_cids()## This session file shows cids used for result# defined at the specified node.## 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_utl_get_result_cids()# has the following arguments:## res_utl_get_result_cids# ( res_ids,# type,# nids,# ids,# cids )##---------------------------------------------------------------------# Variable DeclarationsINTEGER ia_res_ids(5)INTEGER i_typeINTEGER i_nidsINTEGER ia_ids(1)INTEGER ia_cids(1)INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationia_res_ids = [3, 1, 2, 1, 1]i_type = 1 i_nids = 1ia_ids = [100]#---------------------------------------------------------------------# Clear any previous results from the memoryi_return_value = res_utl_clear_result()dump i_return_value#---------------------------------------------------------------------# Extract cids for the specified nodesi_return_value = @ res_utl_get_results_cids @ ( ia_res_ids, @ i_type, @ i_nids, @ ia_ids, @ ia_cids )dump i_return_valuedump ia_cids#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_extract_nodal_results()## This session file extracts specified results# from the database. It gives the result at each# node along with the type of result, node ids, # minimum and maximum values of results within# specified nodes.# # 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_utl_extract_nodal_results()# has the following arguments:## res_utl_extract_nodal_results# ( res_ids,# node_list,# derivation,# cid,# datatype,# nres,# ids,# results,# minloc,# maxloc )##---------------------------------------------------------------------# Variable DeclarationsINTEGER ia_res_ids(5)STRING s_node_list[15]STRING s_derivation[5]STRING s_cid[1]INTEGER i_datatypeINTEGER i_nresINTEGER iv_ids(VIRTUAL)REAL rv_results(VIRTUAL)INTEGER ia_minloc(6)INTEGER ia_maxloc(6)INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationia_res_ids = [3, 1, 2, 1, 1]s_node_list = "Node 10:20"s_derivation = "MAG" s_cid = ""#---------------------------------------------------------------------# Extract the result data for specified nodesi_return_value = @ res_utl_extract_nodal_results @ ( ia_res_ids, @ s_node_list, @ s_derivation, @ s_cid, @ i_datatype, @ i_nres, @ iv_ids, @ rv_results, @ ia_minloc, @ ia_maxloc )dump i_return_valuedump i_datatype# This value shows type of resultdump i_nres# This value shows number of node idsdump iv_ids# This shows list of node idsdump rv_results# This shows magnitude of results at the specified nodesdump ia_minloc# This value shows minimum result componentdump ia_maxloc# This value shows maximum result component sys_free_array(iv_ids)sys_free_array(rv_results)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_extract_nodal_history()## This session file extracts specified results# from the database. It gives the result at each# node along with the type of result, node ids.# It also gives load case/subcase id array index# for each node maximum and minimum result # component.## 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_utl_extract_nodal_history()# has the following arguments:## res_utl_extract_nodal_history# ( nlcs,# lcids,# subids,# res_ids,# node_list,# derivation,# cid,# datatype,# nres,# ids,# results,# minloc,# maxloc )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_nlcsINTEGER ia_lcids(2)INTEGER ia_subids(2)INTEGER ia_res_ids(3)STRING s_node_list[15]STRING s_derivation[5]STRING s_cid[2]INTEGER i_datatypeINTEGER i_nresINTEGER iv_ids(VIRTUAL)REAL rv_results(VIRTUAL)INTEGER iv_minloc(VIRTUAL)INTEGER iv_maxloc(VIRTUAL)INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationi_nlcs = 2 ia_lcids = [3, 4]ia_subids = [1, 2]ia_res_ids = [2, 1, 1]s_node_list = "Node 10:20"s_derivation = "MAG" s_cid = ""#---------------------------------------------------------------------# Extract the result data for specified nodesi_return_value = @ res_utl_extract_nodal_history @ ( i_nlcs, @ ia_lcids, @ ia_subids, @ ia_res_ids, @ s_node_list, @ s_derivation, @ s_cid, @ i_datatype, @ i_nres, @ iv_ids, @ rv_results, @ iv_minloc, @ iv_maxloc )dump i_return_valuedump i_datatype# This value shows type of resultdump i_nres# This value shows number of node idsdump iv_ids# This shows list of node idsdump rv_results# These values shows the results associated with the specified nodesdump iv_minloc# This shows load case/subcase id array index for each node minimum# result componentdump iv_maxloc# This shows load case/subcase id array index for each node maximum# result componentsys_free_array(iv_ids)sys_free_array(rv_results)sys_free_array(iv_minloc)sys_free_array(iv_maxloc)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_create_nodal_result()## This session file creates new result case and# writes to the database. The new result case is# then displayed in the viewport.## 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_utl_create_nodal_result()# has the following arguments:## res_utl_create_nodal_result# ( res_ids,# prim_title,# sec_title,# nids,# ids,# cid_list,# datatype,# results )##---------------------------------------------------------------------# Variable DeclarationsINTEGER iINTEGER ia_res_ids(5)STRING s_prim_title[80]STRING s_sec_title[80]INTEGER i_nidsINTEGER iv_ids(VIRTUAL)STRING s_cid_list[10]INTEGER i_datatypeREAL rv_new_results(VIRTUAL)INTEGER i_return_valueINTEGER i_nresINTEGER ia_minloc(6)INTEGER ia_maxloc(6)REAL rv_results(VIRTUAL)#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Extracts the existing resultsi_return_value = @ res_utl_extract_nodal_results( [4, 2, 2, 1, @ 1], "Node 1:#", "MAG", "", i_datatype, @ i_nres, iv_ids, rv_results, ia_minloc, ia_maxloc )dump i_return_value#---------------------------------------------------------------------# Argument initializationia_res_ids = [4, 2, 0, 0, 1]s_prim_title = "New result case"s_sec_title = "Displacement"i_nids = i_nress_cid_list = ""#---------------------------------------------------------------------# Creates new result values twice the older valuessys_allocate_array(rv_new_results, 1, i_nres)FOR (i = 1 TO i_nres) rv_new_results(i) = 2 * rv_results(i)END FOR#---------------------------------------------------------------------# Creates new result casei_return_value = @ res_utl_create_nodal_result @ ( ia_res_ids, @ s_prim_title, @ s_sec_title, @ i_nids, @ iv_ids, @ s_cid_list, @ i_datatype, @ rv_new_results )dump i_return_value#---------------------------------------------------------------------# Creates the ploti_return_value = @ res_data_load_dbresult( 0, "Nodal", "Scalar", @ "SPOOL_LOADS", "Static Subcase", @ "New result case", "Displacement", @ "(NON-LAYERED)", "", "Default", @ "DeriveAverage", "All", "ShapeFunc" )dump i_return_valuei_return_value = @ res_data_title( 0, "Nodal", "Scalar", 1, @ [ "SPOOL_LOADS, Static Subcase: New result @ case, Displacement-(NON-LAYERED) "] )dump i_return_valuei_return_value = @ res_display_fringe_create( "", "FreeFaces", 0,@ [""], 12, [ "Range:Fri_default_Fringe", @ "RangeOverwrite:ON", @ "FringeStyle:Discrete/Smooth" , @ "Shade:None", @ "ElemEdge:FreeEdge,Blue,Solid,1", @ "Shrink:0", "TitleDisplay:ON", @ "MinMaxDisplay:ON", "ValueDisplay:OFF", @ "Filter:None", "ScaleFactor:1.", @ "LabelStyle:Exponential, 12, White, 3"], TRUE )dump i_return_valuei_return_value = @ res_display_fringe_post( "", 0, "Nodal", TRUE, TRUE )dump i_return_valuesys_free_array(iv_ids)sys_free_array(rv_new_results)sys_free_array(rv_results)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_extract_elem_results()## This session file extracts specified results# from the database. It gives the result at each# elements along with the type of result, element# 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_utl_extract_elem_results()# has the following arguments:## res_utl_extract_elem_results# ( res_ids,# elem_list,# derivation,# location,# cid,# datatype,# resloc,# nres,# ids,# nresults,# results,# minloc,# maxloc )##---------------------------------------------------------------------# Variable DeclarationsINTEGER ia_res_ids(5)STRING s_elem_list[12], s_derivation[5], s_location[10], s_cid[2]INTEGER i_datatype, i_resloc, i_nres, iv_ids(VIRTUAL)INTEGER iv_nresults(VIRTUAL) INTEGER i_return_value, iv_minloc(VIRTUAL), iv_maxloc(VIRTUAL) REAL rv_results(VIRTUAL)#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationia_res_ids = [3, 1, 2, 1, 1]s_elem_list = "Elem 295:305"s_derivation = "MAG"s_location = "N[odal]"s_cid = ""#---------------------------------------------------------------------# Extract the result data for specified elementsi_return_value = @ res_utl_extract_elem_results @ ( ia_res_ids, @ s_elem_list, @ s_derivation, @ s_location, @ s_cid, @ i_datatype, @ i_resloc, @ i_nres, @ iv_ids, @ iv_nresults, @ rv_results, @ iv_minloc, @ iv_maxloc )dump i_return_valuedump i_datatype# This value shows type of result, 1=scaler, 2=vector, 3=tensordump i_resloc# This value returns the result location, 1=centroid, 2=nodal# 3=multiple. dump i_nres# This value shows the number of elements selecteddump iv_ids# This shows list of element idsdump iv_nresults# This value shows number of results per element.dump rv_results# This value shows all the results at the specified element locationsdump iv_minloc# This shows an array index for each minimum result componentdump iv_maxloc# This shows an array index for each maximum result componentsys_free_array(iv_ids)sys_free_array(iv_nresults)sys_free_array(rv_results)sys_free_array(iv_minloc)sys_free_array(iv_maxloc)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_extract_elem_history()## This session file extracts specified results# from the database. It gives the result at each# element along with the type of result, element # ids. It also gives an array index for each # minimum and maximum element result component. ## 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_utl_extract_elem_history()# has the following arguments:## res_utl_extract_elem_history# ( nlcs,# lcids,# subids,# res_ids,# elem_list,# derivation,# location,# cid,# datatype,# resloc,# nres,# ids,# nresults,# results,# minloc,# maxloc )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_nlcs, ia_lcids(2), ia_subids(2), ia_res_ids(3)STRING s_elem_list[12], s_derivation[12], s_location[12], s_cid[12]INTEGER i_datatype, i_resloc, i_nres, iv_ids(VIRTUAL)INTEGER iv_nresults(VIRTUAL), iv_minloc(VIRTUAL), iv_maxloc(VIRTUAL)REAL rv_results(VIRTUAL)INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationi_nlcs = 2 ia_lcids = [3, 4]ia_subids = [1, 2]ia_res_ids = [2, 1, 1]s_elem_list = "Elem 200"s_derivation = "MAG"s_location = "C[entroid]"s_cid = ""#---------------------------------------------------------------------# Clear any previous results from the memoryi_return_value = res_utl_clear_result()dump i_return_value #---------------------------------------------------------------------# Extract result data for one element from the database i_return_value = @ res_utl_extract_elem_history @ ( i_nlcs, @ ia_lcids, @ ia_subids, @ ia_res_ids, @ s_elem_list, @ s_derivation, @ s_location, @ s_cid, @ i_datatype, @ i_resloc, @ i_nres, @ iv_ids, @ iv_nresults, @ rv_results, @ iv_minloc, @ iv_maxloc )dump i_return_valuedump i_datatype# This shows type of result 1=scaler, 2=vector, 3=tensor dump i_resloc# This shows result location 1=centroid, 2=nodal, 3=multipledump i_nres# This shows the number of element iddump iv_ids# This shows list of element idsdump iv_nresults# This shows number of results per elementdump rv_results# This shows result at the specified elementdump iv_minloc# This shows minimum element result componentdump iv_maxloc# This shows maximum element result componentsys_free_array(iv_ids)sys_free_array(iv_nresults)sys_free_array(rv_results)sys_free_array(iv_minloc)sys_free_array(iv_maxloc)#---------------------------------------------------------------------() |
# Purpose : This file provides an example of a call to the# function res_utl_create_elem_result() ## This session file creates new result case and # writes to the database. After that the new result # case can be displayed in the viewport. # # 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. # # 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_utl_create_elem_result() # has the following arguments:## res_utl_create_elem_result( resultids, @# primary_title, @# secondary_title, @# nids, @# ids, @ # cidlist, @# datatype, @# location, @# nresults, @# results)# ##---------------------------------------------------------------------# Variable DeclerationINTEGER resultids(5)STRING primary_title[80]STRING secondary_title[80]INTEGER nids INTEGER ids(virtual)STRING cidlist[12]INTEGER datatypeSTRING location[12]INTEGER nresults(VIRTUAL)REAL results(VIRTUAL)STRING elem_list[12]STRING derivation[12]INTEGER resloc, cntINTEGER min_loc(12), max_loc(12)INTEGER nrc, lcids(virtual), subids(virtual)INTEGER nres, primary_id(virtual), secondary_id(virtual)INTEGER nsub(virtual), nsub1INTEGER result_ids(4), nlayers, layerids(VIRTUAL)STRING layerlabels[80](VIRTUAL)INTEGER i_return_value#---------------------------------------------------------------------# Opening the file spool.dbuil_file_open.go( "./spool.db") #---------------------------------------------------------------------# Clear any previous results from the memoryres_utl_clear_result()#---------------------------------------------------------------------# Gets the loadcases associated with the results res_utl_get_loadcases(nrc, lcids, nsub)dump nrc, lcids, nsub#---------------------------------------------------------------------# Gets the subcasesres_utl_get_subcases(lcids(1), nsub1, subids)dump lcids(1), nsub1, subids#---------------------------------------------------------------------# Gets the result idsres_utl_get_result_ids ( nrc, lcids, @ subids, nres, @ primary_id, secondary_id)dump nres, primary_id, secondary_iddump nrcdump lcidsdump subids#---------------------------------------------------------------------# Gets the layer positions associated with the resultsresult_ids(1) = lcids(1)result_ids(2) = subids(1)result_ids(3) = primary_id(2)result_ids(4) = secondary_id(2)res_utl_get_result_layers( result_ids, nlayers, @ layerids, layerlabels) dump nlayersdump layeridsdump layerlabels#---------------------------------------------------------------------# Extracts result data for 10 elements (Elm 1:10) from the databaseresultids(1) = lcids(1)resultids(2) = subids(1)resultids(3) = primary_id(2)resultids(4) = secondary_id(2)resultids(5) = layerids(1)elem_list = "Elm 1:10"derivation = "MAG"location = "N[odal"cidlist = ""res_utl_extract_elem_results ( resultids, @ elem_list, @ derivation, @ location, @ cidlist, @ datatype, @ resloc, @ cnt, @ ids, @ nresults, @ results, @ min_loc, @ max_loc )#---------------------------------------------------------------------# Dump all extracted results as a outputdump datatypedump reslocdump cntdump idsdump nresultsdump results dump min_locdump max_loc #---------------------------------------------------------------------# Argument Initializationresultids(1) = lcids(1)resultids(2) = subids(1)resultids(3) = 0resultids(4) = 0 resultids(5) = layerids(1)primary_title = "NEW RESULT CASE"secondary_title = "Displacement"nids = nreslocation = "N[odal"cidlist = ""#---------------------------------------------------------------------# Created new result case in the database as a # "NEW RESULT CASE" (Primary load case title) and # "DISPLACEMENT" (Secondary load case title)i_return_value = res_utl_create_elem_result( resultids, @ primary_title, @ secondary_title, @ nids, @ ids, @ cidlist, @ datatype, @ location, @ nresults, @ results )#---------------------------------------------------------------------# Dump the return value of the function and output of the used function.# The resultids(3) and resultids(4) are created newly. dump i_return_valuedump resultids#---------------------------------------------------------------------# Closing the patran environment.uil_file_close.goquit( )#---------------------------------------------------------------------# End of File.() |
## Purpose : This file provides an example of a call to the# function res_utl_extract_path_results()## This session file extracts the specified result# data from the database along a specified set# of XYZ coordinates.## 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_utl_extract_path_results()# has the following arguments:## res_utl_extract_path_results# ( res_ids,# npts,# pts,# derivation,# cid,# datatype,# results,# minloc,# maxloc,# elem_ids )##---------------------------------------------------------------------# Variable DeclarationsINTEGER ia_res_ids(5)INTEGER i_nptsREAL ra_pts(3)STRING s_derivation[5]STRING s_cid[8]INTEGER i_datatypeREAL rv_results(VIRTUAL)INTEGER ia_minloc(6)INTEGER ia_maxloc(6)INTEGER ia_elem_ids(1)INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationia_res_ids = [2, 2, 2, 1, 1]## Where ia_res_ids[0] = loadcase id (in this case 2)# ia_res_ids[1] = subcase id (in this case 2)# ia_res_ids[2] = Primary results_id (2 for Displacements)# ia_res_ids[3] = Secondary results_id (1 for Translational)# ia_res_ids[4] = Layer Position id (1 for (Non-Layered)i_npts = 1#Try various points by using the FEM Element Show menu for Node values#Example point this point does give a result value:ra_pts = [-4.0, 8.0, -1.75]s_derivation = "MAG"s_cid = "Coord 1"s_derivation = "MAG" s_cid = "Coord 1"#---------------------------------------------------------------------# Extracts the results along the specified coordinatesi_return_value = @ res_utl_extract_path_results @ ( ia_res_ids, @ i_npts, @ ra_pts, @ s_derivation, @ s_cid, @ i_datatype, @ rv_results, @ ia_minloc, @ ia_maxloc, @ ia_elem_ids )dump i_return_valuedump i_datatypedump rv_resultsdump ia_minlocdump ia_maxlocdump ia_elem_idssys_free_array(rv_results)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_get_loadcases()## This session file retrieves the existing load# cases associated with results 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_utl_get_loadcases()# has the following arguments:## res_utl_get_loadcases# ( ncases,# lcids,# nsub )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_ncasesINTEGER iv_lcids(VIRTUAL)INTEGER iv_nsub(VIRTUAL)INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Gets the loadcases associated with the resultsi_return_value = @ res_utl_get_loadcases @ ( i_ncases, @ iv_lcids, @ iv_nsub )dump i_return_valuedump i_ncases# This value shows number of loadcasesdump iv_lcids# This shows the list of load case idsdump iv_nsub# This shows number of subcases for each load casesys_free_array(iv_lcids)sys_free_array(iv_nsub)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_get_subcases()## This session file retrieves the existing# subcases associated with results 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_utl_get_subcases()# has the following arguments:## res_utl_get_subcases# ( lcid,# nsub,# subids )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_lcidINTEGER i_nsubINTEGER iv_subids(VIRTUAL)INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationi_lcid = 3#---------------------------------------------------------------------# Gets the subcasesi_return_value = @ res_utl_get_subcases @ ( i_lcid, @ i_nsub, @ iv_subids )dump i_return_valuedump i_nsub# This shows the number of subcasesdump iv_subids# This shows the list of subcase idssys_free_array(iv_subids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_get_result_ids()## This session file retrieves the existing result# ids associated with a list of load case/subcase# ids from the database.## Before running this session file run spool.ses# and import result file spool.op2 to create# spool.db with results. 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_utl_get_result_ids()# has the following arguments:## res_utl_get_result_ids# ( ncls,# lcid,# subids,# nres,# prim_ids,# sec_ids )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_nclsINTEGER ia_lcid(2)INTEGER ia_subids(2)INTEGER i_nresINTEGER iv_prim_ids(VIRTUAL)INTEGER iv_sec_ids(VIRTUAL)INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationi_ncls = 2ia_lcid = [3, 4]ia_subids = [1, 1]#---------------------------------------------------------------------# Gets the result idsi_return_value = @ res_utl_get_result_ids @ ( i_ncls, @ ia_lcid, @ ia_subids, @ i_nres, @ iv_prim_ids, @ iv_sec_ids )dump i_return_valuedump i_nres# This value shows the number of resultsdump iv_prim_ids# This shows the list of primary result idsdump iv_sec_ids# This shows the list of secondary result idssys_free_array(iv_prim_ids)sys_free_array(iv_sec_ids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_get_result_layers()## This session file retrieves the layer positions# associated with results 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_utl_get_result_layers()# has the following arguments:## res_utl_get_result_layers# ( res_ids,# nlayers,# ids,# labels )##---------------------------------------------------------------------# Variable DeclarationsINTEGER ia_res_ids(4)INTEGER i_nlayersINTEGER iv_ids(VIRTUAL)STRING sav_labels[32](VIRTUAL)INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationia_res_ids = [3, 1, 2, 1]#---------------------------------------------------------------------# Gets the layer positions associated with the resultsi_return_value = @ res_utl_get_result_layers @ ( ia_res_ids, @ i_nlayers, @ iv_ids, @ sav_labels )dump i_return_valuedump i_nlayers# This shows the number of associated layersdump iv_ids# This shows a list of layer position idsdump sav_labels# This shows the labels for the layerssys_free_array(iv_ids)sys_free_array(sav_labels)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_get_global_vars()## This session file retrieves the existing global# variables from the database.## Before running this session file run dyna.ses# to create dyna.db. Then create dyna.op2 as per# the instructions in dyna.ses and import it in# dyna.db to create dyna.db with results.## 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_utl_get_global_vars()# has the following arguments:## res_utl_get_global_vars# ( nvar,# varnames )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_nvarSTRING sav_varnames[16](VIRTUAL)INTEGER i_return_value#---------------------------------------------------------------------# Opens the file dyna.dbuil_file_open.go ("dyna.db")#---------------------------------------------------------------------# Gets global variables i_return_value = @ res_utl_get_global_vars @ ( i_nvar, @ sav_varnames )dump i_return_valuedump i_nvar# This value shows number of global variables dump sav_varnames# This shows the label for the variable.sys_free_array(sav_varnames)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_get_global_var_for_lc()## This function retrieves the value of a specific# global variable associated with a loadcase.## Before running this session file run dyna.ses# to create dyna.db. Then create dyna.op2 as per# the instructions in dyna.ses and import it in# dyna.db to create dyna.db with results.## 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_utl_get_global_var_for_lc()# has the following arguments:## res_utl_get_global_var_for_lc# ( lcid,# subid,# varname,# ncomp,# vals )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_lcidINTEGER i_subidSTRING s_varname[10]INTEGER i_ncompREAL ra_vals(6)INTEGER i_return_value#---------------------------------------------------------------------# Opens the file dyna.dbuil_file_open.go ("dyna.db")#---------------------------------------------------------------------# Argument initializationi_lcid = 1 i_subid = 5s_varname = "Frequency"#---------------------------------------------------------------------# Retrieve value of the specified global variablei_return_value = @ res_utl_get_global_var_for_lc @ ( i_lcid, @ i_subid, @ s_varname, @ i_ncomp, @ ra_vals )dump i_return_valuedump i_ncomp# This shows number of components used for the variable valuedump ra_vals# This shows the value of global variable#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_get_subcases_by_gv()## This session file retrieves all subcase ids # with the specified global variable value within# the specified range.## Before running this session file run dyna.ses# to create dyna.db. Then create dyna.op2 as per# the instructions in dyna.ses and import it in# dyna.db to create dyna.db with results.## 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_utl_get_subcases_by_gv()# has the following arguments:## res_utl_get_subcases_by_gv# ( lcid,# varname,# compnum,# val1,# val2,# method,# nscs,# subids )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_lcidSTRING s_varname[16]INTEGER i_compnumREAL r_val1REAL r_val2STRING s_method[16]INTEGER i_nscsINTEGER iv_subids(VIRTUAL)INTEGER i_return_value#---------------------------------------------------------------------# Opens the file dyna.dbuil_file_open.go ("dyna.db")#---------------------------------------------------------------------# Sets the viewport sizega_viewport_size_set("default_viewport", 6.926, 5.29, 1)ga_viewport_location_set("default_viewport", 0.000, 3.826, 1)#---------------------------------------------------------------------# Argument initializationi_lcid = 1s_varname = "Mode number"i_compnum = 1r_val1 = 1.r_val2 = 10.s_method = "B[etween]"#---------------------------------------------------------------------i_return_value = @ res_utl_get_subcases_by_gv @ ( i_lcid, @ s_varname, @ i_compnum, @ r_val1, @ r_val2, @ s_method, @ i_nscs, @ iv_subids )dump i_return_valuedump i_nscs# This shows the number of subcases associated with the given rangedump iv_subids# This shows list of subcase ids associated with the given range of# Mode numberssys_free_array(iv_subids)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_calc_results()## This session file operates mathematically on# two arrays on a component by component basis.## 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_utl_calc_results()# has the following arguments:## res_utl_calc_results# ( res1,# operator,# res2,# res3 )##---------------------------------------------------------------------# Variable DeclarationsREAL ra_res1(2)STRING s_operator[5]REAL ra_res2(2)REAL ra_res3(2)INTEGER i_return_value#---------------------------------------------------------------------# Argument initializationra_res1 = [10., 20.]s_operator = "*"ra_res2 = [5., 3.]#---------------------------------------------------------------------# Calculates the resulti_return_value = @ res_utl_calc_results @ ( ra_res1, @ s_operator, @ ra_res2, @ ra_res3 )dump i_return_valuedump ra_res3# First value in the array shows the multiplication of 10.0 and 5.0 # and second value shows the multiplication of 20.0 and 3.0#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_dot_results()## This session file calculates the dot product of# 2 vector arrays.# # 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_utl_dot_results()# has the following arguments:## res_utl_dot_results# ( nres,# res1,# res2,# res3 )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_nresREAL ra_res1(2, 3)REAL ra_res2(2, 3)REAL ra_res3(2)INTEGER i_return_value#---------------------------------------------------------------------# Argument initializationi_nres = 2ra_res1 = [[1., 4., 5.] [2., 2., 2.]]ra_res2 = [[1., 2., 3.] [4., 5., 6.]]#---------------------------------------------------------------------# Calculates the dot producti_return_value = @ res_utl_dot_results @ ( i_nres, @ ra_res1, @ ra_res2, @ ra_res3 )dump i_return_valuedump ra_res3# This shows the dot product of two arrays#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_cross_results()## This session file calculates the cross product# of 2 vector arrays.## 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_utl_cross_results()# has the following arguments:## res_utl_cross_results# ( nres,# res1,# res2,# res3 )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_nresREAL ra_res1(2, 3)REAL ra_res2(2, 3)REAL ra_res3(2, 3)INTEGER i_return_value#---------------------------------------------------------------------# Argument initializationi_nres = 2ra_res1 = [[1., 4., 5.] [2., 2., 2.]]ra_res2 = [[1., 2., 3.] [4., 5., 6.]]#---------------------------------------------------------------------# Calculates cross productsi_return_value = @ res_utl_cross_results @ ( i_nres, @ ra_res1, @ ra_res2, @ ra_res3 )dump i_return_valuedump ra_res3# This shows the cross product of two arrays#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_utl_transform_results()## This session file transforms the input vector# or tensor from one rectangular coordinate # system to another.## 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_utl_transform_results()# has the following arguments:## res_utl_transform_results# ( nvals,# ncomp,# in_vals,# from_cid,# to_cid,# out_vals )##---------------------------------------------------------------------# Opens file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Variable DeclarationsINTEGER i_nvalsINTEGER i_ncompREAL ra_in_vals(1, 3)INTEGER i_from_cidINTEGER i_to_cidREAL ra_out_vals(1, 3)INTEGER i_return_valueSTRING asm_create_cord_axi_created_ids[VIRTUAL]#---------------------------------------------------------------------# Creates a new coordinate framei_return_value = @ asm_const_coord_axis( "2", "XY", "Coord 0", 1,@ "[0 0 5]", "[1 0 0]", "[0 1 0]" , @ asm_create_cord_axi_created_ids )dump i_return_value#---------------------------------------------------------------------# Argument initializationi_nvals = 1i_ncomp = 3ra_in_vals = [[1., 1., 0.]]i_from_cid = 0i_to_cid = 2#---------------------------------------------------------------------# Transforms the input vectori_return_value = @ res_utl_transform_results @ ( i_nvals, @ i_ncomp, @ ra_in_vals, @ i_from_cid, @ i_to_cid, @ ra_out_vals )dump i_return_valuedump ra_out_vals# This shows the transformed array#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function db_get_load_case_title()## This session file retrieves the title for a # specified loadcase id.## Before running this session file run spool.ses# and import result file spool.op2 to create# spool.db with results. 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 db_get_load_case_title()# has the following arguments:## db_get_load_case_title# ( id,# title )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_idSTRING s_title[32]INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationi_id = 4#---------------------------------------------------------------------# Gets the loadcase titlei_return_value = @ db_get_load_case_title @ ( i_id, @ s_title )dump i_return_valuedump s_title# This shows the loadcase title#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function db_get_load_case_id()## This session file retrieves the id for a# specified loadcase title.## Before running this session file run spool.ses# and import result file spool.op2 to create# spool.db with results. 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 db_get_load_case_id()# has the following arguments:## db_get_load_case_id# ( title,# id )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_title[32]INTEGER i_idINTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializations_title = "SPOOL_LOADS"#---------------------------------------------------------------------# Gets the loadcase id i_return_value = @ db_get_load_case_id @ ( s_title, @ i_id )dump i_return_valuedump i_id# This shows loadcase id for specified loadcase title#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function db_get_sub_case_title()## This session file retrieves the title for a# specified loadcase/subcase id.## Before running this session file run spool.ses# and import result file spool.op2 to create# spool.db with results. 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 db_get_sub_case_title()# has the following arguments:## db_get_sub_case_title# ( lcid,# subid,# title )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_lcidINTEGER i_subidSTRING s_title[32]INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationi_lcid = 4i_subid = 2 #---------------------------------------------------------------------# Gets the subcase titlei_return_value = @ db_get_sub_case_title @ ( i_lcid, @ i_subid, @ s_title )dump i_return_valuedump s_title# This shows the subcase title #---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function db_get_sub_case_id()## This session file retrieves the id for a# specified loadcase/subcase title.## Before running this session file run spool.ses# and import result file spool.op2 to create# spool.db with results. 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 db_get_sub_case_id()# has the following arguments:## db_get_sub_case_id# ( lcid,# title,# subid )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_lcidSTRING s_title[32]INTEGER i_subidINTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationi_lcid = 4s_title = "Static Subcase"#---------------------------------------------------------------------# Gets the loadcase/subcase idi_return_value = @ db_get_sub_case_id @ ( i_lcid, @ s_title, @ i_subid )dump i_return_valuedump i_subid# This value shows subcase id for the specified title#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function db_get_primary_res_label()## This session file retrieves the title for a# specified primary result id.## Before running this session file run spool.ses# and import result file spool.op2 to create# spool.db with results. 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 db_get_primary_res_label()# has the following arguments:## db_get_primary_res_label# ( id,# label )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_idSTRING s_label[32]INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationi_id = 2#---------------------------------------------------------------------# Gets the primary result labeli_return_value = @ db_get_primary_res_label @ ( i_id, @ s_label )dump i_return_valuedump s_label# This shows the primary result label#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function db_get_primary_res_id()## This session file retrieves the id for a# specified primary result label.## Before running this session file run spool.ses# and import result file spool.op2 to create# spool.db with results. 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 db_get_primary_res_id()# has the following arguments:## db_get_primary_res_id# ( label,# id )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_label[32]INTEGER i_idINTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializations_label = "Stress Tensor"#---------------------------------------------------------------------# Gets the primary result idi_return_value = @ db_get_primary_res_id @ ( s_label, @ i_id )dump i_return_valuedump i_id# This value shows primary result id#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function db_get_secondary_res_label()## This session file retrieves the label for a# specified secondary result id.## Before running this session file run spool.ses# and import result file spool.op2 to create# spool.db with results. 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 db_get_secondary_res_label()# has the following arguments:## db_get_secondary_res_label# ( primary_id,# secondary_id,# label )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_primary_idINTEGER i_secondary_idSTRING s_label[32]INTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationi_primary_id = 2i_secondary_id = 1#---------------------------------------------------------------------# Gets the secondary result labeli_return_value = @ db_get_secondary_res_label @ ( i_primary_id, @ i_secondary_id, @ s_label )dump i_return_valuedump s_label# This shows the secondary result label#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function db_get_secondary_res_id()## This session file retrieves the id for a# specified secondary result label.## Before running this session file run spool.ses# and import result file spool.op2 to create# spool.db with results. 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 db_get_secondary_res_id()# has the following arguments:## db_get_secondary_res_id# ( primary_id,# label,# secondary_id )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_primary_idSTRING s_label[32]INTEGER i_secondary_idINTEGER i_return_value#---------------------------------------------------------------------# Opens the file spool.dbuil_file_open.go ("spool.db")#---------------------------------------------------------------------# Argument initializationi_primary_id = 1s_label = "Translational"#---------------------------------------------------------------------# Gets the secondary result idi_return_value = @ db_get_secondary_res_id @ ( i_primary_id, @ s_label, @ i_secondary_id )dump i_return_valuedump i_secondary_id# This value shows the id for the specified secondary result label#---------------------------------------------------------------------