() |
## Purpose : This file provides example of two calls to the# function xy_curve_nposted_get()## This file opens a new database "new.db" and# creates a window. Later it gets the number of# posted curves in the database. Finally it# creates a curve and gets the number of posted# curves again.## This file can be run by starting a session of# Patran, opening a new or existing database,# and running this session file through the # "File","Session","Play" pulldown menus# on the menu bar.## The function xy_curve_nposted_get()# has the following arguments:## xy_curve_nposted_get# ( nposted )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_npostedINTEGER i_return_valueSTRING s_window_name[32]REAL r_x_locationREAL r_y_locationREAL r_widthREAL r_height#---------------------------------------------------------------------# Opening new database new.dbuil_file_new.go("","new.db")$? YES 36000002# Create a new window.s_window_name = "XY_Window"r_x_location = 2.5r_y_location = 3.5r_width = 5.0r_height = 5.0i_return_value = @ xy_window_create @ ( s_window_name, @ r_x_location, @ r_y_location, @ r_width, @ r_height )dump i_return_value# Get the number of posted curvesi_return_value = @ xy_curve_nposted_get( i_nposted)dump i_return_valuedump i_nposted#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Create a curvei_return_value = @ xy_curve_create( "curve_1", "data of x vs y", 1)dump i_return_valuei_return_value = @ xy_curve_data_set @ ( "curve_1", FALSE, 10, [1., 2., 3., 4., @ 5., 6., 7., 8., 9., 10.], [-5., 6., 4., @ -10., -7., 10., 15., 23., -20., -11.])dump i_return_value#---------------------------------------------------------------------# Get the number of posted curvesi_return_value = @ xy_curve_nposted_get( i_nposted)dump i_return_valuedump i_nposted#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function xy_curve_posted_get()## This file opens a new database "new.db" and# creates a window and a curve in it. The above# mentioned function is called to get the list of# posted curves from the database.# # This file can be run by starting a session of# Patran, opening a new or existing database,# and running this session file through the # "File","Session","Play" pulldown menus# on the menu bar.## The function xy_curve_posted_get()# has the following arguments:## xy_curve_posted_get# ( posted_list )##---------------------------------------------------------------------# Variable DeclarationsSTRING sav_posted_list[32](VIRTUAL)INTEGER i_return_valueSTRING s_window_name[32]REAL r_x_locationREAL r_y_locationREAL r_widthREAL r_heightINTEGER i_nposted#---------------------------------------------------------------------# Opening new database new.dbuil_file_new.go("","new.db")$? YES 36000002# Create a new window.s_window_name = "XY_Window"r_x_location = 2.5r_y_location = 3.5r_width = 5.0r_height = 5.0i_return_value = @ xy_window_create @ ( s_window_name, @ r_x_location, @ r_y_location, @ r_width, @ r_height )dump i_return_value#---------------------------------------------------------------------# Create a curvei_return_value = @ xy_curve_create("curve_1", "data of x vs y", 1)dump i_return_valuei_return_value = @ xy_curve_data_set @ ( "curve_1", FALSE, 10, [1., 2., 3., 4., @ 5., 6., 7., 8., 9., 10.], [-5., 6., 4., @ -10., -7., 10., 15., 23., -20., -11.])dump i_return_value#---------------------------------------------------------------------# Get the number of posted curvesi_return_value = @ xy_curve_nposted_get( i_nposted)dump i_return_value# Get the list of posted curvessys_allocate_array( sav_posted_list, 1, i_nposted)i_return_value = @ xy_curve_posted_get @ ( sav_posted_list)dump i_return_valuedump sav_posted_listsys_free_array(sav_posted_list)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of two call to # the function xy_title_nposted_get()## This session file opens a new database ’new.db’# and creates a xy window. The above mentioned# function is called to get the number of posted# titles in the database. A new title is then# created and again the above mentioned function# is called to get the number of posted titles.# # This file can be run by starting a session of# Patran, opening a new or existing database,# and running this session file through the # "File","Session","Play" pulldown menus# on the menu bar.## The function xy_title_nposted_get()# has the following arguments:## xy_title_nposted_get# ( nposted )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_npostedINTEGER i_return_valueSTRING s_window_name[32]REAL r_x_locationREAL r_y_locationREAL r_widthREAL r_height#---------------------------------------------------------------------# Opening new database new.dbuil_file_new.go("","new.db")$? YES 36000002# Create a new window.s_window_name = "XY_Window"r_x_location = 2.5r_y_location = 3.5r_width = 5.0r_height = 5.0i_return_value = @ xy_window_create @ ( s_window_name, @ r_x_location, @ r_y_location, @ r_width, @ r_height )dump i_return_value# Get the number of posted titlesi_return_value = @ xy_title_nposted_get @ (i_nposted)dump i_return_valuedump i_nposted#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Create a titlei_return_value = @ xy_title_create @ ( "TITLE_1", "TITLE_1", 14,[5.0, 10.0], 1)dump i_return_value#---------------------------------------------------------------------# Get the number of posted titlesi_return_value = @ xy_title_nposted_get @ ( i_nposted )dump i_return_valuedump i_nposted#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function xy_title_posted_get()## This session file opens a new database ’new.db’# and creates a new xy window. Two new titles are# created and posted to the xy window. The above # mentioned function is called to get the list of# posted titles.# # This file can be run by starting a session of# Patran, opening a new or existing database,# and running this session file through the # "File","Session","Play" pulldown menus# on the menu bar.## The function xy_title_posted_get()# has the following arguments:## xy_title_posted_get# ( posted_list )##---------------------------------------------------------------------# Variable DeclarationsSTRING sav_posted_list[32](VIRTUAL)INTEGER i_return_valueSTRING s_window_name[32]REAL r_x_locationREAL r_y_locationREAL r_widthREAL r_heightINTEGER i_nposted#---------------------------------------------------------------------# Opening new database new.dbuil_file_new.go("","new.db")$? YES 36000002# Create a new window.s_window_name = "XY_Window"r_x_location = 2.5r_y_location = 3.5r_width = 5.0r_height = 5.0i_return_value = @ xy_window_create @ ( s_window_name, @ r_x_location, @ r_y_location, @ r_width, @ r_height )dump i_return_value#---------------------------------------------------------------------# Create two titlesi_return_value = @ xy_title_create @ ( "TITLE_1", "TITLE_1", 14,[5.0, 10.0], 1)dump i_return_valuei_return_value = @ xy_title_create @ ( "TITLE_2", "TITLE_2", 14,[5.0, 20.0], 1)dump i_return_value#---------------------------------------------------------------------# Get the number of posted titlesi_return_value = @ xy_title_nposted_get( i_nposted)dump i_return_value# Get the list of posted titlessys_allocate_array( sav_posted_list, 1, i_nposted)i_return_value = @ xy_title_posted_get @ ( sav_posted_list)dump i_return_valuedump sav_posted_listsys_free_array(sav_posted_list)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function xy_window_curve_post()## This session file opens a new database ’new.db’# and creates two xy windows. A curve is created # in the second xy window. The above mentioned # function is called to post this curve to the# first xy window.# # This file can be run by starting a session of# Patran, opening a new or existing database,# and running this session file through the # "File","Session","Play" pulldown menus# on the menu bar.## The function xy_window_curve_post()# has the following arguments:## xy_window_curve_post# ( window_name,# curve_name )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_window_name[32]STRING s_curve_name[32]INTEGER i_return_value#---------------------------------------------------------------------# Opening new database new.dbuil_file_new.go("","new.db")$? YES 36000002# Create two xy windowss_window_name = "XY_Window1"i_return_value = @ xy_window_create @ ( s_window_name, 1.5, 3.5, 5., 5.)dump i_return_values_window_name = "XY_Window2"i_return_value = @ xy_window_create @ ( s_window_name, 6.5, 3.5, 5., 5.)dump i_return_value#---------------------------------------------------------------------# Create a curve in the second windowi_return_value = @ xy_curve_create( "curve_1", "data of x vs y", 1)dump i_return_valuei_return_value = @ xy_curve_data_set @ ( "curve_1", FALSE, 10, [1., 2., 3., 4., @ 5., 6., 7., 8., 9., 10.], [-5., 6., 4., @ -10., -7., 10., 15., 23., -20., -11.])dump i_return_value#---------------------------------------------------------------------# Session file paused press ’Resume’ to continuesf_pause()#---------------------------------------------------------------------# Post the curve to the first windows_window_name = "XY_Window1"s_curve_name = "curve_1"i_return_value = @ xy_window_curve_post @ ( s_window_name, @ s_curve_name )dump i_return_value#---------------------------------------------------------------------() |
# Purpose : This file provides an example of a call to the# function xy_window_curve_unpost()## This session file opens a new database ’new.db’# and a new xy window is created. A new curve is# created and the number of posted curves is get.# The above mentioned function is then called to# unpost the curve from the xy window. The number# of posted curves is get again.# # This file can be run by starting a session of# Patran, opening a new or existing database,# and running this session file through the # "File","Session","Play" pulldown menus# on the menu bar.## The function xy_window_curve_unpost()# has the following arguments:## xy_window_curve_unpost# ( window_name,# curve_name )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_window_name[32]STRING s_curve_name[32]INTEGER i_return_valueINTEGER i_nposted#---------------------------------------------------------------------# Opening new database new.dbuil_file_new.go("","new.db")$? YES 36000002# Create a new window.s_window_name = "XY_Window1"i_return_value = @ xy_window_create @ ( s_window_name, 1.5, 3.5, 5., 5.)dump i_return_value#---------------------------------------------------------------------# Create a curve and get the number of posted curvesi_return_value = @ xy_curve_create ( "curve_1", "data of x vs y", 1)dump i_return_valuei_return_value = @ xy_curve_data_set @ ( "curve_1", FALSE, 10, [1., 2., 3., 4., @ 5., 6., 7., 8., 9., 10.], [-5., 6., 4., @ -10., -7., 10., 15., 23., -20., -11.])dump i_return_valuei_return_value = @ xy_curve_nposted_get( i_nposted)dump i_return_valuedump i_nposted#---------------------------------------------------------------------# Session file paused press ’Resume’ to continuesf_pause()#---------------------------------------------------------------------# Unpost the current curve from the windows_window_name = "XY_Window1"s_curve_name = "curve_1"i_return_value = @ xy_window_curve_unpost @ ( s_window_name, @ s_curve_name )dump i_return_value# Get the number of posted curves againi_return_value = @ xy_curve_nposted_get( i_nposted)dump i_return_valuedump i_nposted#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function xy_window_title_post()## This session file opens a new database ’new.db’# and creates two xy windows. A title is created # in the second xy window. The above mentioned # function is called to post this title to the# first xy window.## This file can be run by starting a session of# Patran, opening a new or existing database,# and running this session file through the # "File","Session","Play" pulldown menus# on the menu bar.## The function xy_window_title_post()# has the following arguments:## xy_window_title_post# ( window_name,# title_name )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_window_name[32]STRING s_title_name[256]INTEGER i_return_value#---------------------------------------------------------------------# Opening new database new.dbuil_file_new.go("","new.db")$? YES 36000002# Create two xy windowss_window_name = "XY_Window1"i_return_value = @ xy_window_create @ ( s_window_name, 1.5, 3.5, 5., 5.)dump i_return_values_window_name = "XY_Window2"i_return_value = @ xy_window_create @ ( s_window_name, 6.5, 3.5, 5., 5.)dump i_return_value#---------------------------------------------------------------------# Create a titlei_return_value = @ xy_title_create @ ( "TITLE_1", "TITLE_1", 40,[5.0, 20.0], 1)dump i_return_value#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Post the title to the first windows_window_name = "XY_Window1"s_title_name = "TITLE_1"i_return_value = @ xy_window_title_post @ ( s_window_name, @ s_title_name )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function xy_window_title_unpost()## This session file opens a new database ’new.db’# and a new xy window is created. A new title is# created and the number of posted titles is get.# The above mentioned function is then called to# unpost the title from the xy window. The number# of posted titles is get again.# # This file can be run by starting a session of# Patran, opening a new or existing database,# and running this session file through the # "File","Session","Play" pulldown menus# on the menu bar.## The function xy_window_title_unpost()# has the following arguments:## xy_window_title_unpost# ( window_name,# title_name )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_window_name[32]STRING s_title_name[256]INTEGER i_return_valueINTEGER i_nposted#---------------------------------------------------------------------# Opening new database new.dbuil_file_new.go("","new.db")$? YES 36000002# Create a new window.s_window_name = "XY_Window1"i_return_value = @ xy_window_create @ ( s_window_name, 1.5, 3.5, 5., 5.)dump i_return_value#---------------------------------------------------------------------# Create a title and get the number of posted titlesi_return_value = @ xy_title_create @ ( "TITLE_1", "TITLE_1", 40,[5.0, 20.0], 1)dump i_return_valuei_return_value = @ xy_title_nposted_get( i_nposted)dump i_return_valuedump i_nposted#---------------------------------------------------------------------# Session file paused press ’Resume’ to continuesf_pause()#---------------------------------------------------------------------# Unpost the current title from the windows_window_name = "XY_Window1"s_title_name = "TITLE_1"i_return_value = @ xy_window_title_unpost @ ( s_window_name, @ s_title_name )dump i_return_value# Get the number of posted titles againi_return_value = @ xy_title_nposted_get( i_nposted)dump i_return_valuedump i_nposted#---------------------------------------------------------------------