() |
#
# Purpose : This file provides an example of a call to the
# function loadcase_create()
#
# This function creates a new load case.
#
# In this example a new database is opened and
# paused for the user to observe the Load Cases
# Form. On resuming, this function is called
# to create a new load case ("NEW_LOAD_CASE"),
# which appears immediately in the load-cases
# form.
#
# 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 loadcase_create()
# has the following arguments:
#
# loadcase_create
# ( lc_name,
# lc_type,
# lc_desc,
# lbc_names,
# priorities,
# dlname,
# dynamic_value,
# make_current )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_lc_name[32]
STRING s_lc_type[32]
STRING s_lc_desc[32]
STRING sa_lbc_names[32](1)
INTEGER ia_priorities(32)
STRING s_dlname[32]
REAL r_dynamic_value
LOGICAL l_make_current
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Activate "Load Cases" of Application radio button and observe
# the names of available load cases
# Session file paused. Press "Resume" to continue..
sf_pause()
#---------------------------------------------------------------------
# Create Load case "NEW_LOAD_CASE"
s_lc_name = "NEW_LOAD_CASE"
s_lc_type = "Static"
s_lc_desc = "Example load case"
s_dlname = ""
r_dynamic_value = 0.0
l_make_current = TRUE
i_return_value = @
loadcase_create @
( s_lc_name, @
s_lc_type, @
s_lc_desc, @
sa_lbc_names, @
ia_priorities, @
s_dlname, @
r_dynamic_value, @
l_make_current )
dump i_return_value
# Note the changes in the Load Cases form
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function loadcase_delete()
#
# This function deletes the specified load case.
#
# In this example a new database is opened and
# 2 load cases (LOAD_CASE_ONE, LOAD_CASE_TWO)
# are created. After a pause this function is
# called to delete "LOAD_CASE_ONE". The
# deletion is confirmed by observing the Load
# Cases Form before and after deletion.
#
# 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 loadcase_delete()
# has the following arguments:
#
# loadcase_delete
# ( lc_name,
# del_lbcs )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_lc_name[16]
LOGICAL l_del_lbcs
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Create Load case "LOAD_CASE_ONE" and "LOAD_CASE_TWO"
i_return_value = loadcase_create( "LOAD_CASE_ONE", "Static", @
"", [""], [0], "", 0.0, FALSE)
dump i_return_value
i_return_value = loadcase_create( "LOAD_CASE_TWO", "Static", @
"", [""], [0], "", 0.0, FALSE)
dump i_return_value
#---------------------------------------------------------------------
# Activate "Load Cases" of Application radio button and observe
# the names of available load cases
# Session file paused. Press "Resume" to continue..
sf_pause()
#---------------------------------------------------------------------
# Delete load case "LOAD_CASE_ONE"
s_lc_name = "LOAD_CASE_ONE"
l_del_lbcs = FALSE
i_return_value = @
loadcase_delete @
( s_lc_name, @
l_del_lbcs )
dump i_return_value
# Refresh all forms that are currently visible
ui_wid_refresh()
# Note the changes in the Load Cases form.
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function loadcase_modify()
#
# This function modifies a load case in the
# database.
#
# In this example a new database is opened and
# a cuboid is created with 2 load sets. Then a
# load case(NEW_LOAD_CASE) is created and the
# session file is paused for observation of
# Load-Cases Form. On resuming, NEW_LOAD_CASE
# is modified using this function.
#
# 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 loadcase_modify()
# has the following arguments:
#
# loadcase_modify
# ( old_name,
# new_name,
# lc_type,
# lc_desc,
# lbc_names,
# priorities,
# dlname,
# dynamic_value,
# make_current )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_old_name[32]
STRING s_new_name[32]
STRING s_lc_type[32]
STRING s_lc_desc[64]
STRING sa_lbc_names[32](2)
INTEGER ia_priorities(2)
STRING s_dlname[32]
REAL r_dynamic_value
LOGICAL l_make_current
INTEGER i_return_value
STRING sv_create_hpat_xyz_created_ids[VIRTUAL]
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
i_return_value = ga_view_aa_set( 23., -34., 0. )
dump i_return_value
#---------------------------------------------------------------------
# Create Cuboid ( 10 X 1 X 1 )
i_return_value = asm_const_hpat_xyz( "1", "<10 1 1>", "[0 0 0]",@
"Coord 0", sv_create_hpat_xyz_created_ids )
dump i_return_value
# Create Load/BC set "NEW_DISP" and "NEW_FORCE"
i_return_value = loadsbcs_create( "NEW_DISP", "Displacement", @
"Nodal", "", "Static", ["Point 1 2 5 6"], "Geometry", @
"Coord 0", 1., ["< 0. 0. 0. >", "< 0. 0. 0. >"], ["", ""] )
dump i_return_value
i_return_value = loadsbcs_create( "NEW_FORCE", "Force", "Nodal",@
"", "Static", ["Point 3 7"], "Geometry", "Coord 0", 1., @
["< 0 -100 0 >", "< 0. 0. 0. >"], ["", ""] )
dump i_return_value
#---------------------------------------------------------------------
# Create Load case "NEW_LOAD_CASE"
i_return_value = loadcase_create( "NEW_LOAD_CASE", "Static", "",@
[""], [0], "", 0.0, FALSE )
dump i_return_value
#---------------------------------------------------------------------
# Activate "Load Cases" of Application radio button and set action
# to "Show". Observe the name of current load case and the list of
# available load cases
# Session file paused. Press "Resume" to continue..
sf_pause()
#---------------------------------------------------------------------
# Modify load case "NEW_LOAD_CASE"
s_old_name = "NEW_LOAD_CASE"
s_new_name = "MODIFIED_LOAD_CASE"
s_lc_type = "Static"
s_lc_desc = "Modified Load case"
sa_lbc_names(1) = "NEW_DISP"
sa_lbc_names(2) = "NEW_FORCE"
ia_priorities = [ 0, 0]
s_dlname = ""
r_dynamic_value = 0.0
l_make_current = TRUE
i_return_value = @
loadcase_modify @
( s_old_name, @
s_new_name, @
s_lc_type, @
s_lc_desc, @
sa_lbc_names, @
ia_priorities, @
s_dlname, @
r_dynamic_value, @
l_make_current )
dump i_return_value
#---------------------------------------------------------------------
# Note the changes in the Loadcase form
sys_free_string(sv_create_hpat_xyz_created_ids)
#---------------------------------------------------------------------
() |
#
# Purpose : This file provides an example of a call to the
# function loadcase_show()
#
# This function shows/displays the specified
# load-case in a form.
#
# In this example a new database is opened and
# a load case is created. Then this function is
# called to display the details of created load
# case.
#
# 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 loadcase_show() has the following arguments:
#
# loadcase_show
# ( lc_name )
#
#---------------------------------------------------------------------
# Variable Declarations
STRING s_lc_name[32]
INTEGER i_return_value
#---------------------------------------------------------------------
# Open a new database "new.db"
uil_file_new.go("","new.db")
$? YES 36000002
#---------------------------------------------------------------------
# Create Load case "NEW_LOAD_CASE"
i_return_value = loadcase_create( "NEW_LOAD_CASE", "Static", "",@
[""], [0], "", 0.0, FALSE)
dump i_return_value
#---------------------------------------------------------------------
# Show Load case "NEW_LOAD_CASE"
s_lc_name = "NEW_LOAD_CASE"
i_return_value = @
loadcase_show @
( s_lc_name )
dump i_return_value
#---------------------------------------------------------------------