() |
## Purpose : This file provides an example of a call to the# function pref_geo_get_v1()## This illustration opens a new database and gets# the geometry preference of the current database# Then it changes the geometry preferences and# gets it again.## 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 pref_geo_get_v1()# has the following arguments:## pref_geo_get_v1# ( default_coord_frame,# geometric_tolerance,# working_plane )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_default_coord_frameREAL r_geometric_toleranceINTEGER i_working_planeINTEGER i_return_valueSTRING sv_asm_create_cord_3po_creat_id[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Get the geometry preference settings.i_return_value = @ pref_geo_get_v1 @ ( i_default_coord_frame, @ r_geometric_tolerance, @ i_working_plane )dump i_return_value# Geometry preference settings aredump i_default_coord_framedump r_geometric_tolerancedump i_working_plane#---------------------------------------------------------------------# Create a Coordinate framei_return_value = @ asm_const_coord_3point( "1", "Coord 0", @ 1, "[0 0 0]", "[0 0 1]", "[1 0 0]", @ sv_asm_create_cord_3po_creat_id )dump i_return_value#---------------------------------------------------------------------# Set a different Geometry preferencei_default_coord_frame = 1r_geometric_tolerance = 0.005i_working_plane = 1i_return_value = @ pref_geo_set_v1 @ ( i_default_coord_frame, @ r_geometric_tolerance, @ i_working_plane)dump i_return_value#---------------------------------------------------------------------# Get the geometry preference settings.i_return_value = @ pref_geo_get_v1 @ ( i_default_coord_frame, @ r_geometric_tolerance, @ i_working_plane )dump i_return_value# Geometry preference settings aredump i_default_coord_framedump r_geometric_tolerancedump i_working_planesys_free_string(sv_asm_create_cord_3po_creat_id)#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function pref_geo_set()## This illustration opens a new database and gets# the geometry preference of the current database# Then it changes the geometry preferences and# gets it again.## 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 pref_geo_set() has the following arguments:## pref_geo_set# ( default_coord_frame,# geometric_tolerance )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_default_coord_frameREAL r_geometric_toleranceINTEGER i_return_valueSTRING sv_asm_create_cord_3po_creat_id[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Get the geometry preference settings.i_return_value = @ pref_geo_get @ ( i_default_coord_frame, @ r_geometric_tolerance )dump i_return_value# Geometry preference settings aredump i_default_coord_framedump r_geometric_tolerance#---------------------------------------------------------------------# Create a Coordinate framei_return_value = @ asm_const_coord_3point( "1", "Coord 0", @ 1, "[0 0 0]", "[0 0 1]", "[1 0 0]", @ sv_asm_create_cord_3po_creat_id )dump i_return_value#---------------------------------------------------------------------# Set a different Geometry preferencei_default_coord_frame = 1r_geometric_tolerance = 0.005i_return_value = @ pref_geo_set @ ( i_default_coord_frame, @ r_geometric_tolerance )dump i_return_value#---------------------------------------------------------------------# Get the geometry preference settings.i_return_value = @ pref_geo_get @ ( i_default_coord_frame, @ r_geometric_tolerance )dump i_return_value# Geometry preference settings aredump i_default_coord_framedump r_geometric_tolerancesys_free_string(sv_asm_create_cord_3po_creat_id)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function pref_geo_set()## This illustration opens a new database and gets# the geometry preference of the current database# Then it changes the geometry preferences and# gets it again.## 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 pref_geo_set() has the following arguments:## pref_geo_set# ( default_coord_frame,# geometric_tolerance )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_default_coord_frameREAL r_geometric_toleranceINTEGER i_return_valueSTRING sv_asm_create_cord_3po_creat_id[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Get the geometry preference settings.i_return_value = @ pref_geo_get @ ( i_default_coord_frame, @ r_geometric_tolerance )dump i_return_value# Geometry preference settings aredump i_default_coord_framedump r_geometric_tolerance#---------------------------------------------------------------------# Create a Coordinate framei_return_value = @ asm_const_coord_3point( "1", "Coord 0", @ 1, "[0 0 0]", "[0 0 1]", "[1 0 0]", @ sv_asm_create_cord_3po_creat_id )dump i_return_value#---------------------------------------------------------------------# Set a different Geometry preferencei_default_coord_frame = 1r_geometric_tolerance = 0.005i_return_value = @ pref_geo_set @ ( i_default_coord_frame, @ r_geometric_tolerance )dump i_return_value#---------------------------------------------------------------------# Get the geometry preference settings.i_return_value = @ pref_geo_get @ ( i_default_coord_frame, @ r_geometric_tolerance )dump i_return_value# Geometry preference settings aredump i_default_coord_framedump r_geometric_tolerancesys_free_string(sv_asm_create_cord_3po_creat_id)#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function pref_geo_set_v1()## This illustration opens a new database and gets# the geometry preference of the current database# Then it changes the geometry preferences and# gets it again.## 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 pref_geo_set_v1() has the following arguments:## pref_geo_set_v1# ( default_coord_frame,# geometric_tolerance,# working_plane )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_default_coord_frameREAL r_geometric_toleranceINTEGER i_working_planeINTEGER i_return_valueSTRING sv_asm_create_cord_3po_creat_id[VIRTUAL]#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Get the geometry preference settings.i_return_value = @ pref_geo_get_v1 @ ( i_default_coord_frame, @ r_geometric_tolerance, @ i_working_plane )dump i_return_value# Geometry preference settings aredump i_default_coord_framedump r_geometric_tolerancedump i_working_plane#---------------------------------------------------------------------# Create a Coordinate framei_return_value = @ asm_const_coord_3point( "1", "Coord 0", @ 1, "[0 0 0]", "[0 0 1]", "[1 0 0]", @ sv_asm_create_cord_3po_creat_id )dump i_return_value#---------------------------------------------------------------------# Set a different Geometry preferencei_default_coord_frame = 1r_geometric_tolerance = 0.005i_working_plane = 1i_return_value = @ pref_geo_set_v1 @ ( i_default_coord_frame, @ r_geometric_tolerance, @ i_working_plane)dump i_return_value#---------------------------------------------------------------------# Get the geometry preference settings.i_return_value = @ pref_geo_get_v1 @ ( i_default_coord_frame, @ r_geometric_tolerance, @ i_working_plane )dump i_return_value# Geometry preference settings aredump i_default_coord_framedump r_geometric_tolerancedump i_working_planesys_free_string(sv_asm_create_cord_3po_creat_id)#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function pref_global_get()## This illustration opens a new database and gets# the global preference of the current database.# Then it changes the global preferences and# gets it again. Finally it changes the global# preference settings into the original value.## 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 pref_global_get()# has the following arguments:## pref_global_get# ( confirm,# warning_message,# global_tolerance )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_confirmINTEGER i_warning_messageREAL r_global_tolerance,r_old_toleranceINTEGER i_return_value#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Get the global preference settings.i_return_value = @ pref_global_get @ ( l_confirm, @ i_warning_message, @ r_global_tolerance )dump i_return_value# Global preference settings aredump l_confirm, i_warning_message, r_global_tolerance#---------------------------------------------------------------------# Set new Global preference settings.IF (l_confirm == TRUE) THEN l_confirm = FALSEELSE l_confirm = TRUEEND IFIF ( i_warning_message == 3 ) THEN i_warning_message = 2ELSE i_warning_message = 3END IFr_old_tolerance = r_global_tolerance r_global_tolerance = 0.009i_return_value = @ pref_global_set @ ( l_confirm, @ i_warning_message, @ r_global_tolerance )dump i_return_value#---------------------------------------------------------------------# Get the global preference settings.i_return_value = @ pref_global_get @ ( l_confirm, @ i_warning_message, @ r_global_tolerance )dump i_return_value# Global preference settings aredump l_confirm, i_warning_message, r_global_tolerance#---------------------------------------------------------------------# Set the original values of Global preference settings.IF (l_confirm == TRUE) THEN l_confirm = FALSEELSE l_confirm = TRUEEND IFIF ( i_warning_message == 3 ) THEN i_warning_message = 2ELSE i_warning_message = 3END IFr_global_tolerance = r_old_tolerancei_return_value = @ pref_global_set @ ( l_confirm, @ i_warning_message, @ r_global_tolerance )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function pref_global_set()## This illustration opens a new database and gets# the global preference of the current database.# Then it changes the global preferences and# gets it again. Finally it changes the global# preference settings into the original value.## 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 pref_global_set() has the following arguments:## pref_global_set# ( confirm,# warning_message,# global_tolerance )##---------------------------------------------------------------------# Variable DeclarationsLOGICAL l_confirmINTEGER i_warning_messageREAL r_global_tolerance, r_old_toleranceINTEGER i_return_value#---------------------------------------------------------------------# Open a new databaseuil_file_new.go( "", "./new.db" )$? YES 36000002# Get the global preference settings.i_return_value = @ pref_global_get @ ( l_confirm, @ i_warning_message, @ r_global_tolerance )dump i_return_value# Global preference settings aredump l_confirm, i_warning_message, r_global_tolerance#---------------------------------------------------------------------# Set new Global preference settings.IF (l_confirm == TRUE) THEN l_confirm = FALSEELSE l_confirm = TRUEEND IFIF ( i_warning_message == 3 ) THEN i_warning_message = 2ELSE i_warning_message = 3END IFr_old_tolerance = r_global_tolerance r_global_tolerance = 0.009i_return_value = @ pref_global_set @ ( l_confirm, @ i_warning_message, @ r_global_tolerance )dump i_return_value#---------------------------------------------------------------------# Get the global preference settings.i_return_value = @ pref_global_get @ ( l_confirm, @ i_warning_message, @ r_global_tolerance )dump i_return_value# Global preference settings aredump l_confirm, i_warning_message, r_global_tolerance#---------------------------------------------------------------------# Set the original values of Global preference settings.IF (l_confirm == TRUE) THEN l_confirm = FALSEELSE l_confirm = TRUEEND IFIF ( i_warning_message == 3 ) THEN i_warning_message = 2ELSE i_warning_message = 3END IFr_global_tolerance = r_old_tolerancei_return_value = @ pref_global_set @ ( l_confirm, @ i_warning_message, @ r_global_tolerance )dump i_return_value#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function pref_env_get_integer()## In this illustration, the value of a Integer# preference "message_warning" is changed. Then # again the old value is set to that Integer# preference.## 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 pref_env_get_integer() has the following arguments:## pref_env_get_integer# ( preference_name,# integer_value )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_preference_name[128]INTEGER i_integer_value, i_old_valueINTEGER i_return_value#---------------------------------------------------------------------# Get the value of the Integer preference "message_warning"#s_preference_name = "message_warning"i_return_value = @ pref_env_get_integer @ ( s_preference_name, @ i_integer_value )dump i_return_value# Value of "message_warning" isdump i_integer_value #---------------------------------------------------------------------# Set a different value to the Integer Preference.i_old_value = i_integer_valueIF (i_integer_value == 3) THEN i_integer_value = 2ELSE i_integer_value = 3END IFi_return_value = @ pref_env_set_integer @ ( s_preference_name, @ i_integer_value )dump i_return_value#---------------------------------------------------------------------# Get the value of the Integer preference "message_warning"#i_return_value = @ pref_env_get_integer @ ( s_preference_name, @ i_integer_value )dump i_return_value# Value of "message_warning" isdump i_integer_value#---------------------------------------------------------------------# Set the original value to the Integer Preference.i_integer_value = i_old_value i_return_value = @ pref_env_set_integer @ ( s_preference_name, @ i_integer_value )dump i_return_value#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function pref_env_get_logical()## In this illustration, the value of a Logical# preference "revert_enabled" is changed. Then# again the old value is set to that Logical# preference.## 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 pref_env_get_logical() has the following arguments:## pref_env_get_logical# ( preference_name,# logical_value )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_preference_name[128]LOGICAL l_logical_value, l_old_valueINTEGER i_return_value#---------------------------------------------------------------------# Get the value of the Logical preference "revert_enabled"#s_preference_name = "revert_enabled"#i_return_value = @ pref_env_get_logical @ ( s_preference_name, @ l_logical_value )dump i_return_value# Value of "revert_enabled" isdump l_logical_value#---------------------------------------------------------------------# Set a different value to the Logical Preference.l_old_value = l_logical_valueIF (l_logical_value == TRUE) THEN l_logical_value = FALSEELSE l_logical_value = TRUEEND IFi_return_value = @ pref_env_set_logical @ ( s_preference_name, @ l_logical_value )dump i_return_value#---------------------------------------------------------------------# Get the value of the Logical preference "revert_enabled"#i_return_value = @ pref_env_get_logical @ ( s_preference_name, @ l_logical_value )dump i_return_value# Value of "revert_enabled" isdump l_logical_value#---------------------------------------------------------------------# Set the old value to the Logical Preference.l_logical_value= l_old_value i_return_value = @ pref_env_set_logical @ ( s_preference_name, @ l_logical_value )dump i_return_value#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function pref_env_get_real()## In this illustration, the value of a real # preference "hc_letter_ht" is changed. Then # the old value is set to that real preference.## 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 pref_env_get_real() has the following arguments:## pref_env_get_real# ( preference_name,# real_value )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_preference_name[128]REAL r_real_value, r_old_valueINTEGER i_return_value#---------------------------------------------------------------------# Get the value of the real preference "hc_letter_ht".#s_preference_name = "hc_letter_ht"i_return_value = @ pref_env_get_real @ ( s_preference_name, @ r_real_value )dump i_return_value# The value of the preference isdump r_real_value#---------------------------------------------------------------------# Set a different value to the preference.r_old_value = r_real_valuer_real_value = 0.5i_return_value = @ pref_env_set_real @ ( s_preference_name, @ r_real_value )dump i_return_value#---------------------------------------------------------------------# Get the value of the real preference "hc_letter_ht".#i_return_value = @ pref_env_get_real @ ( s_preference_name, @ r_real_value )dump i_return_value# The value of the preference isdump r_real_value#---------------------------------------------------------------------# Set a different value to the preference.r_real_value = r_old_value i_return_value = @ pref_env_set_real @ ( s_preference_name, @ r_real_value )dump i_return_value#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function pref_env_get_string()## In this illustration, the value of a String# preference "graphics_fullcolor" is changed. # Then again the old value is set to that String# preference.## 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 pref_env_get_string() has the following arguments:## pref_env_get_string# ( preference_name,# string_value )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_preference_name[128]STRING s_string_value[128], s_old_value[128]INTEGER i_return_value#---------------------------------------------------------------------# Get the value of the String preference "graphics_fullcolor"#s_preference_name = "graphics_fullcolor"#i_return_value = @ pref_env_get_string @ ( s_preference_name, @ s_string_value )dump i_return_value# The value of the string preference is dump s_string_value #---------------------------------------------------------------------# Set a different value to the String Preferences_old_value = s_string_valueIF (s_string_value == "NO") THEN s_string_value = "YES"ELSE s_string_value = "NO"END IFi_return_value = @ pref_env_set_string @ ( s_preference_name, @ s_string_value )dump i_return_value#---------------------------------------------------------------------# Get the value of the String preference "graphics_fullcolor"#i_return_value = @ pref_env_get_string @ ( s_preference_name, @ s_string_value )dump i_return_value# The value of the string preference is dump s_string_value #---------------------------------------------------------------------# Set the original value to the String Preferences_string_value = s_old_value i_return_value = @ pref_env_set_string @ ( s_preference_name, @ s_string_value )dump i_return_value#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function pref_env_set_integer()## In this illustration, the value of an Integer# preference "message_warning" is changed. Then# again the old value is set to that Integer# preference.## 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 pref_env_set_integer() has the following arguments:## pref_env_set_integer# ( preference_name,# integer_value )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_preference_name[128]INTEGER i_integer_value, i_old_valueINTEGER i_return_value#---------------------------------------------------------------------# Get the value of the Integer preference "message_warning"#s_preference_name = "message_warning"i_return_value = @ pref_env_get_integer @ ( s_preference_name, @ i_integer_value )dump i_return_value# Value of "message_warning" isdump i_integer_value #---------------------------------------------------------------------# Set a different value to the Integer Preference.i_old_value = i_integer_valueIF (i_integer_value == 3) THEN i_integer_value = 2ELSE i_integer_value = 3END IFi_return_value = @ pref_env_set_integer @ ( s_preference_name, @ i_integer_value )dump i_return_value#---------------------------------------------------------------------# Get the value of the Integer preference "message_warning"#i_return_value = @ pref_env_get_integer @ ( s_preference_name, @ i_integer_value )dump i_return_value# Value of "message_warning" isdump i_integer_value#---------------------------------------------------------------------# Set the original value to the Integer Preference.i_integer_value = i_old_value i_return_value = @ pref_env_set_integer @ ( s_preference_name, @ i_integer_value )dump i_return_value#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function pref_env_set_logical()## In this illustration, the value of a Logical# preference "revert_enabled" is changed. Then# again the old value is set to that Logical# preference.## 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 pref_env_set_logical() has the following arguments:# pref_env_set_logical# ( preference_name,# logical_value )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_preference_name[128]LOGICAL l_logical_value, l_old_valueINTEGER i_return_value#---------------------------------------------------------------------# Get the value of the Logical preference "revert_enabled"#s_preference_name = "revert_enabled"#i_return_value = @ pref_env_get_logical @ ( s_preference_name, @ l_logical_value )dump i_return_value# Value of "revert_enabled" isdump l_logical_value#---------------------------------------------------------------------# Set a different value to the Logical Preference.l_old_value = l_logical_valueIF (l_logical_value == TRUE) THEN l_logical_value = FALSEELSE l_logical_value = TRUEEND IFi_return_value = @ pref_env_set_logical @ ( s_preference_name, @ l_logical_value )dump i_return_value#---------------------------------------------------------------------# Get the value of the Logical preference "revert_enabled"#i_return_value = @ pref_env_get_logical @ ( s_preference_name, @ l_logical_value )dump i_return_value# Value of "revert_enabled" isdump l_logical_value#---------------------------------------------------------------------# Set the old value to the Logical Preference.l_logical_value= l_old_value i_return_value = @ pref_env_set_logical @ ( s_preference_name, @ l_logical_value )dump i_return_value#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function pref_env_set_real()## In this illustration, the value of a real# preference "hc_letter_ht" is changed. Then # the old value is set to that real preference.## 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 pref_env_set_real() has the following arguments:## pref_env_set_real# ( preference_name,# real_value )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_preference_name[128]REAL r_real_value, r_old_valueINTEGER i_return_value#---------------------------------------------------------------------# Get the value of the real preference "hc_letter_ht".#s_preference_name = "hc_letter_ht"i_return_value = @ pref_env_get_real @ ( s_preference_name, @ r_real_value )dump i_return_value# The value of the preference isdump r_real_value#---------------------------------------------------------------------# Set a different value to the preference.r_old_value = r_real_valuer_real_value = 0.5i_return_value = @ pref_env_set_real @ ( s_preference_name, @ r_real_value )dump i_return_value#---------------------------------------------------------------------# Get the value of the real preference "hc_letter_ht".#i_return_value = @ pref_env_get_real @ ( s_preference_name, @ r_real_value )dump i_return_value# The value of the preference isdump r_real_value#---------------------------------------------------------------------# Set a different value to the preference.r_real_value = r_old_value i_return_value = @ pref_env_set_real @ ( s_preference_name, @ r_real_value )dump i_return_value#--------------------------------------------------------------------- () |
## Purpose : This file provides an example of a call to the# function pref_env_set_string()## In this illustration, the value of a String# preference "graphics_fullcolor" is changed.# Then again the old value is set to that String# preference.## 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 pref_env_set_string() has the following arguments:## pref_env_set_string# ( preference_name,# string_value )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_preference_name[128]STRING s_string_value[128], s_old_value[128]INTEGER i_return_value#---------------------------------------------------------------------# Get the value of the String preference "graphics_fullcolor"#s_preference_name = "graphics_fullcolor"#i_return_value = @ pref_env_get_string @ ( s_preference_name, @ s_string_value )dump i_return_value# The value of the string preference is dump s_string_value #---------------------------------------------------------------------# Set a different value to the String Preferences_old_value = s_string_valueIF (s_string_value == "NO") THEN s_string_value = "YES"ELSE s_string_value = "NO"END IFi_return_value = @ pref_env_set_string @ ( s_preference_name, @ s_string_value )dump i_return_value#---------------------------------------------------------------------# Get the value of the String preference "graphics_fullcolor"#i_return_value = @ pref_env_get_string @ ( s_preference_name, @ s_string_value )dump i_return_value# The value of the string preference is dump s_string_value #---------------------------------------------------------------------# Set the original value to the String Preferences_string_value = s_old_value i_return_value = @ pref_env_set_string @ ( s_preference_name, @ s_string_value )dump i_return_value#---------------------------------------------------------------------