() |
## Purpose : This file provides an example of a call to the# function xy_window_rename()## This session file opens a new database ’new.db’# and a new xy window named ’XY_Window’ is# created. The above mentioned function is then# to rename this window to ’Renamed_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_rename()# has the following arguments:## xy_window_rename# ( window_name,# new_name )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_window_name[32]STRING s_new_name[32]INTEGER i_return_value#---------------------------------------------------------------------# Opening new database new.dbuil_file_new.go("","new.db")$? YES 36000002# Create a new window.s_window_name = "XY_Window"i_return_value = @ xy_window_create @ ( s_window_name, 1.5, 3.5, 5., 5.)dump i_return_value#---------------------------------------------------------------------# Session file paused. Press "Resume" to continue..sf_pause()#---------------------------------------------------------------------# Rename the windows_window_name = "XY_Window"s_new_name = "Renamed_XY_Window"i_return_value = @ xy_window_rename @ ( s_window_name, @ s_new_name )dump i_return_value#---------------------------------------------------------------------