() |
## Purpose : This file provides an example of a call to the# function xy_curve_delete()# # This session file opens a new database ’new.db’# A new xy window and a xy curve is created. The# above mentioned function is then called to # delete the curve from the 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_curve_delete()# has the following arguments:## xy_curve_delete# ( curve_name )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_curve_name[32]STRING s_window_name[32]INTEGER i_return_valueREAL 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#---------------------------------------------------------------------# 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#---------------------------------------------------------------------# Session file paused. Press "Resume" to continuesf_pause()#---------------------------------------------------------------------# Delete the curves_curve_name = "curve_1"i_return_value = @ xy_curve_delete @ ( s_curve_name )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function xy_title_delete()## This session file opens a database ’new.db’ # and creates a new xy window. A title is # created and posted to the window. The above# mentioned function is then called to delete the# title.# # 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_delete()# has the following arguments:## xy_title_delete# ( title_name )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_title_name[256]STRING s_window_name[32]INTEGER i_return_valueREAL 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#---------------------------------------------------------------------# Create a titlei_return_value = @ xy_title_create @ ( "TITLE_1", "TITLE_1", 14, [5.0, 10.0], 1)dump i_return_value#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Delete the titles_title_name = "TITLE_1"i_return_value = @ xy_title_delete @ ( s_title_name)dump i_return_value#---------------------------------------------------------------------