() |
## Purpose : This file provides an example of a call to the# function beam_section_create()## This function creates a new beam section with# the given beam shape and a list of dimensions.## In this example a new database is opened and# paused. The user is instructed to check the# listing of available beam sections. Then a beam# of T-section (BEAM_SECTION_1) is created and# the listing of beam-sections is once again# checked.## 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 beam_section_create()# has the following arguments:## beam_section_create# ( name,# shape,# dstrings )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_name[32]STRING s_shape[8]STRING sa_dstrings[32](4)INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Follow the given direction to get a list of "Beam Section"# available in database.## 1. Pick "Properties" of Application-radio button.# 2. Select "1D" against "Dimension", in the Element Properties form# 3. Press "Input Properties..." and activate the databox# against "Section Name" in the appearing form## The above selection displays the list of sections available in# the database in the list box titled "Beam Section" just above# the "OK" button.## Close the forms by picking "Properties" of Application-radio button# and resume the working.#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Create beam section "BEAM_SECTION_1"s_name = "BEAM_SECTION_1"s_shape = "T"sa_dstrings(1) = "5.0"sa_dstrings(2) = "5.0"sa_dstrings(3) = "1.0"sa_dstrings(4) = "1.0"i_return_value = @ beam_section_create @ ( s_name, @ s_shape, @ sa_dstrings )dump i_return_value#---------------------------------------------------------------------# Check the listing of "Beam Section" as instructed before.## It can be observed that the "BEAM_SECTION_1" appearing on the list.#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to # the function beam_section_delete()## This function deletes a list of beams.## In this example a new database is opened and 2# beam-sections (BEAM_1 & BEAM_2) are created.# The session is paused and the user is# instructed to check the listing of available# beam sections. After resuming, BEAM_1 is# deleted using this function and the listing of# available beam sections is once again checked.## 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 beam_section_delete()# has the following arguments:## beam_section_delete# ( section_names )##---------------------------------------------------------------------# Variable DeclarationsSTRING sa_section_names[32](1)INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create beam section "BEAM_1" & "BEAM_2"i_return_value = @ beam_section_create("BEAM_1", "T",["5.0", "5.0", "1.0", "1.0"])dump i_return_valuei_return_value = @ beam_section_create("BEAM_2", "L",["5.0", "5.0", "1.0", "1.0"])dump i_return_value#---------------------------------------------------------------------# Follow the given direction to get a list of "Beam Section"# available in database.## 1. Pick "Properties" of Application-radio button.# 2. Select "1D" against "Dimension", in the Element Properties form# 3. Press "Input Properties..." and activate the databox# against "Section Name" in the appearing form## The above selection displays the list of sections available in# the database in the list box titled "Beam Section" just above# the "OK" button.## Close the forms by picking "Properties" of Application-radio button# and resume the working.#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Delete the "BEAM_1" sa_section_names(1) = "BEAM_1"i_return_value = @ beam_section_delete @ ( sa_section_names )dump i_return_value#---------------------------------------------------------------------# Check the listing of "Beam Section" as instructed before.## It can be observed that the "BEAM_1" not appearing on the list.#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function beam_section_display()## This function creates a new beam section with# the given beam shape and a list of dimensions.## In this example a new database is opened and a# beam of T-section ("BEAM_1") is created# and displayed 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 beam_section_display()# has the following arguments:## beam_section_display# ( shape,# name,# dstrings,# ent_or_loc,# sel_string,# c1 )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_shape[8]STRING s_name[32]STRING sa_dstrings[32](4)STRING s_ent_or_loc[8]STRING s_sel_string[8]REAL r_c1INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create beam section "BEAM_1"i_return_value = @ beam_section_create("BEAM_1", "T",["5.0", "5.0", "1.0", "1.0"])dump i_return_value#---------------------------------------------------------------------# Display beam section "BEAM_1"s_shape = "T"s_name = "BEAM_1"sa_dstrings(1) = "5.0"sa_dstrings(2) = "5.0"sa_dstrings(3) = "1.0"sa_dstrings(4) = "1.0"s_ent_or_loc = ""s_sel_string = ""r_c1 = 0.0i_return_value = @ beam_section_display @ ( s_shape, @ s_name, @ sa_dstrings, @ s_ent_or_loc, @ s_sel_string, @ r_c1 )dump i_return_value #---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function beam_section_modify()## This function modifies an existing beam section# by replacing its name, shape and dimension## In this example a new database is opened and a# beam of T-section ("BEAM_ORIGINAL") is created# and paused. The user is then instructed to# observe the listing of available beam-sections.# After a pause the dimension and the name of# "BEAM_ORIGINAL" are modified and the listing# of available beam sections is once again# checked.## 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 beam_section_modify()# has the following arguments:## beam_section_modify# ( old_name,# new_name,# shape,# dstrings )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_old_name[32]STRING s_new_name[32]STRING s_shape[8]STRING sa_dstrings[32](4)INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create beam section "BEAM_ORIGINAL"s_old_name = "BEAM_ORIGINAL"s_shape = "T"sa_dstrings(1) = "5.0"sa_dstrings(2) = "5.0"sa_dstrings(3) = "1.0"sa_dstrings(4) = "1.0"i_return_value = @ beam_section_create @ ( s_old_name, s_shape, sa_dstrings )dump i_return_value#---------------------------------------------------------------------# Follow the given direction to get a list of "Beam Section"# available in database.## 1. Pick "Properties" of Application-radio button.# 2. Select "1D" against "Dimension", in the Element Properties form# 3. Press "Input Properties..." and activate the databox# against "Section Name" in the appearing form## The above selection displays the list of sections available in# the database in the list box titled "Beam Section" just above# the "OK" button.## Close the forms by picking "Properties" of Application-radio button# and resume the working.#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Modify "BEAM_1"s_new_name = "BEAM_MODIFIED"sa_dstrings(1) = "10.0"sa_dstrings(2) = "10.0"sa_dstrings(3) = "1.0"sa_dstrings(4) = "1.0"i_return_value = @ beam_section_modify @ ( s_old_name, @ s_new_name, @ s_shape, @ sa_dstrings )dump i_return_value#---------------------------------------------------------------------# Check the listing of "Beam Section" as instructed before.## It can be observed that the beam-section,"BEAM_ORIGINAL" being# replaced with "BEAM_MODIFIED"#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function beam_section_report()## This function writes the given information of# a beam section and the calculated section# properties to the report file.## In this example a new database is opened and a# beam section (BEAM_1) is created. Then the# session file is paused for user to input report# file name. Finally this function is called to# write mass properties to the report file.## 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 beam_section_report()# has the following arguments:## beam_section_report# ( shape,# name,# dstrings,# ent_or_loc,# sel_string,# c1 )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_shape[8]STRING s_name[32]STRING sa_dstrings[32](4)STRING s_ent_or_loc[32]STRING s_sel_string[32]REAL r_c1INTEGER i_return_value#---------------------------------------------------------------------# Open a new database "new.db"uil_file_new.go("","new.db")$? YES 36000002#---------------------------------------------------------------------# Create beam section "BEAM_1"s_name = "BEAM_1"s_shape = "T"sa_dstrings(1) = "5.0"sa_dstrings(2) = "5.0"sa_dstrings(3) = "1.0"sa_dstrings(4) = "1.0"i_return_value = @ beam_section_create @ ( s_name, s_shape, sa_dstrings )dump i_return_value#---------------------------------------------------------------------# Follow the given instruction for the input of report file name## 1. Pick "File" from the menu bar# 2. Select "Report"# 3. Input the name of the report file as "BEAM_1.rpt"# 4. Press "Apply" and "Cancel"## Pick "Resume" for session file play##---------------------------------------------------------------------# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Write beam properties to file "BEAM_1.rpt"s_ent_or_loc = ""s_sel_string = ""r_c1 = 0.0i_return_value = @ beam_section_report @ ( s_shape, @ s_name, @ s_dstrings, @ s_ent_or_loc, @ s_sel_string, @ r_c1 )dump i_return_value# It can be observed that a new report file (BEAM_1.rpt) is# created in the current directory. This file contains the# properties of BEAM_1.#---------------------------------------------------------------------