() |
#
# Purpose : This file provides an example of a call to the
# function res_data_delete()
#
# This session file deletes the current
# definition of the specified register.
#
# 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_delete()
# has the following arguments:
#
# res_data_delete
# ( 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")
#---------------------------------------------------------------------
# Defining a register
i_return_value = @
res_data_load_dbresult( 0, "Nodal", "Vector", @
"SPOOL_LOADS", "Static Subcase", @
"Displacements", "Translational", @
"(NON-LAYERED)", "", "AsIs", "", "", "", "", 0. )
dump i_return_value
#---------------------------------------------------------------------
# Checking whether register is defined or not
l_return_value = @
res_data_defined(0, "Nodal", "Vector")
dump l_return_value
#---------------------------------------------------------------------
# Argument initialization
i_register = 0
s_location = "Nodal"
s_register_type = "Vector"
#---------------------------------------------------------------------
# Deletes the data
i_return_value = @
res_data_delete @
( i_register, @
s_location, @
s_register_type )
dump i_return_value
#---------------------------------------------------------------------
# Checking whether register is defined or not
l_return_value = @
res_data_defined(0, "Nodal", "Vector")
dump l_return_value
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function res_data_save()
#
# This session file creates new result case and
# saves it.
#
# Before running this session file run dyna.ses
# and import result file dyna.op2 to create
# dyna.db with results. For instructions
# see file dyna.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_save()
# has the following arguments:
#
# res_data_save
# ( register,
# location,
# register_type,
# load_case,
# subcase,
# layer,
# primary_result,
# secondary_result )
#
#---------------------------------------------------------------------
# Variable Declarations
INTEGER i_register
STRING s_location[16]
STRING s_register_type[16]
STRING s_load_case[16]
STRING s_subcase[16]
STRING s_layer[16]
STRING s_primary_result[16]
STRING s_secondary_result[16]
INTEGER res_create_drv_maxmin_new_lcid
INTEGER res_create_drv_maxmin_new_scid
INTEGER res_create_drv_maxmin_new_rcid
INTEGER i_return_value
#---------------------------------------------------------------------
# Opens the file dyna.db
uil_file_open.go ("dyna.db")
#---------------------------------------------------------------------
# Register definition
i_return_value = @
res_data_load_dbresult( 0, "Nodal", "Vector", @
"Default", "Mode 1:Freq.=751.31", @
"Eigenvectors", "Translational", @
"(NON-LAYERED)", "", "AsIs", "", "", "", "" , 0. )
dump i_return_value
#---------------------------------------------------------------------
# Associates series of result with specified register
i_return_value = @
res_data_dbres_list(0, "Nodal", "Vector", 2, @
["Default", "Default"], ["Mode 1:Freq." // @
"=751.31", "Mode 2:Freq.=1394.7"], @
["Eigenvectors", "Eigenvectors"], @
["Translational", "Translational"], @
["(NON-LAYERED)", "(NON-LAYERED)"])
dump i_return_value
#---------------------------------------------------------------------
# Creating loadcase and subcase
i_return_value = @
res_db_create_loadcase_c( "Derived Results", @
1, "Created by Results Derive", res_create_drv_maxmin_new_lcid )
dump i_return_value
i_return_value = @
res_db_create_subcase_c( 2, "Subcase 1", @
res_create_drv_maxmin_new_scid, res_create_drv_maxmin_new_rcid )
dump i_return_value
#---------------------------------------------------------------------
# Argument initialization
i_register = 0
s_location = "Nodal"
s_register_type = "Vector"
s_load_case = "Derived Results"
s_subcase = "Subcase 1"
s_layer = ""
s_primary_result = "Eigenvectors"
s_secondary_result = ""
#---------------------------------------------------------------------
# Saves the new result case
i_return_value = @
res_data_save @
( i_register, @
s_location, @
s_register_type, @
s_load_case, @
s_subcase, @
s_layer, @
s_primary_result, @
s_secondary_result )
dump i_return_value
#---------------------------------------------------------------------
# Plots the fringe plot of new result case
i_return_value = @
res_data_load_dbresult( 0, "Nodal", "Scalar", @
"Derived Results", "Subcase 1", @
"Eigenvectors", "", "(NON-LAYERED)", "MAG",@
"AsIs", "", "", "", "", 0. )
dump i_return_value
i_return_value = @
res_data_title( 0, "Nodal", "Scalar", 1, @
["Derived Results, Subcase 1, Eigenvectors,@
- Magnitude, (NON-LAYERED)"] )
dump i_return_value
i_return_value = @
res_display_fringe_create( "", "FreeFaces", 0 @
, [""], 12, ["Range:Fri_default_Fringe", @
"RangeOverwrite:ON", "FringeStyle:Disc" // @
"rete/Smooth", "Shade:None", "ElemEdge:" //@
"FreeEdge,Blue,Solid,1", "Shrink:0", @
"TitleDisplay:ON", "MinMaxDisplay:ON", @
"ValueDisplay:OFF", "Filter:None", @
"ScaleFactor:1.", "LabelStyle:Fixed, 8, White, 4"], TRUE )
dump i_return_value
i_return_value = @
res_display_fringe_post( "", 0, "Nodal", TRUE, TRUE )
dump i_return_value
#---------------------------------------------------------------------