() |
## Purpose : This file provides an example of a call to the# function res_display_anim_setup_2d()## In this example field database, containing# the results is opened and a Deformation Plot# tool definition is created & posted in# default viewport. Linear Ramp variation is# set for subsequent animation. Then this# function is called to set the number of# frames to be 30 with linear interpolation.# The animation is started in the end.## Before running this file run field.ses to# create field.db## 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 res_display_anim_setup_2d()# has the following arguments:## res_display_anim_setup_2d# ( number_frames,# interp_method,# file_name )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_number_framesSTRING s_interp_method[32]STRING s_file_name[32]INTEGER i_return_value#---------------------------------------------------------------------# Open the database ’field.db’uil_file_open.go ("field.db")# Set ISO-1 viewingi_return_value = ga_view_aa_set( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create & Post Deformation Plot tooli_return_value = res_data_load_dbresult( 0, "Nodal", "Vector", @ "Default", "Static Subcase", "Displacements", @ "Translational", "(NON-LAYERED)", "", "Global", "", "", "" )dump i_return_valuei_return_value = res_data_title( 0, "Nodal", "Vector", 1, [ @ "Default, Static Subcase: Displacements, Translational-0"// @ " of 0 layers () "] )dump i_return_valuei_return_value = res_display_deformation_create( "", "Elements",@ 0, [""], 9, [ "DeformedStyle:White,Solid,1,Wireframe", @ "DeformedScale:Model=0.1", "UndeformedStyle:ON,"// @ "Blue,Solid,1,Wireframe", "TitleDisplay:ON", @ "MinMaxDisplay:ON", "ScaleFactor:1.", "LabelStyle:"// @ "Exponential, 12, White, 3", "DeformDisplay:Resultant", @ "DeformComps:OFF,OFF,OFF"] )dump i_return_valuei_return_value = res_display_deformation_post( "", 0 )dump i_return_value#---------------------------------------------------------------------# Use Linear Ramp variation for subsequent animationi_return_value = res_display_tool_animate_scale ( "Ramp", @ "Deformation", "", 0.0 )dump i_return_value#---------------------------------------------------------------------# Specify number of frames and interpolation for 2D image animationi_number_frames = 30s_interp_method = "Linear"s_file_name = ""i_return_value = @ res_display_anim_setup_2d @ ( i_number_frames, @ s_interp_method, @ s_file_name )dump i_return_value# Start running animation with delay of 10 milli-seconds per framei_return_value = res_display_anim_run( 10 )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_display_anim_setup_3d()## In this example field database, containing# the results is opened and a Deformation Plot# tool definition is created & posted in# default viewport. Linear Ramp variation is# set for subsequent animation. Then this# function is called to set the number of# frames to be 30 with "Closest" value for# frames. The animation is started in the end.## Before running this file run field.ses to# create field.db## 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 res_display_anim_setup_3d()# has the following arguments:## res_display_anim_setup_3d# ( number_frames,# interp_method )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_number_framesSTRING s_interp_method[32]INTEGER i_return_value#---------------------------------------------------------------------# Open the database ’field.db’uil_file_open.go ("field.db")# Set ISO-1 viewingi_return_value = ga_view_aa_set( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create & Post Deformation Plot tooli_return_value = res_data_load_dbresult( 0, "Nodal", "Vector", @ "Default", "Static Subcase", "Displacements", @ "Translational", "(NON-LAYERED)", "", "Global", "", "", "" )dump i_return_valuei_return_value = res_data_title( 0, "Nodal", "Vector", 1, [ @ "Default, Static Subcase: Displacements, Translational-0"// @ " of 0 layers () "] )dump i_return_valuei_return_value = res_display_deformation_create( "", "Elements",@ 0, [""], 9, [ "DeformedStyle:White,Solid,1,Wireframe", @ "DeformedScale:Model=0.1", "UndeformedStyle:ON,"// @ "Blue,Solid,1,Wireframe", "TitleDisplay:ON", @ "MinMaxDisplay:ON", "ScaleFactor:1.", "LabelStyle:"// @ "Exponential, 12, White, 3", "DeformDisplay:Resultant", @ "DeformComps:OFF,OFF,OFF"] )dump i_return_valuei_return_value = res_display_deformation_post( "", 0 )dump i_return_value#---------------------------------------------------------------------# Use Linear Ramp variation for subsequent animationi_return_value = res_display_tool_animate_scale ( "Ramp", @ "Deformation", "", 0.0 )dump i_return_value#---------------------------------------------------------------------# Specify number of frames and interpolation for 3D image animationi_number_frames = 30s_interp_method = "Closest"i_return_value = @ res_display_anim_setup_3d @ ( i_number_frames, @ s_interp_method )dump i_return_value# Start running animation with delay of 10 milli-seconds per framei_return_value = res_display_anim_run( 10 )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_display_anim_image_create()## In this example field database, containing# the results is opened and a Deformation Plot# tool definition is created & posted in# default viewport. Parameters like method of# variation, interpolation and number of frames# are set and animation is started. Then# animation is stopped and this function is# called to create the image file of the# current frame.## Before running this file run field.ses to# create field.db## 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 res_display_anim_image_create()# has the following arguments:## res_display_anim_image_create# ( file_name )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_file_name[32]INTEGER i_return_value#---------------------------------------------------------------------# Open the database ’field.db’uil_file_open.go ("field.db")# Set ISO-1 viewingi_return_value = ga_view_aa_set( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create & Post Deformation Plot tooli_return_value = res_data_load_dbresult( 0, "Nodal", "Vector", @ "Default", "Static Subcase", "Displacements", @ "Translational", "(NON-LAYERED)", "", "Global", "", "", "" )dump i_return_valuei_return_value = res_data_title( 0, "Nodal", "Vector", 1, [ @ "Default, Static Subcase: Displacements, Translational-0"// @ " of 0 layers () "] )dump i_return_valuei_return_value = res_display_deformation_create( "", "Elements",@ 0, [""], 9, [ "DeformedStyle:White,Solid,1,Wireframe", @ "DeformedScale:Model=0.1", "UndeformedStyle:ON,"// @ "Blue,Solid,1,Wireframe", "TitleDisplay:ON", @ "MinMaxDisplay:ON", "ScaleFactor:1.", "LabelStyle:"// @ "Exponential, 12, White, 3", "DeformDisplay:Resultant", @ "DeformComps:OFF,OFF,OFF"] )dump i_return_valuei_return_value = res_display_deformation_post( "", 0 )dump i_return_value#---------------------------------------------------------------------# Set animation parameters and start animationi_return_value = res_display_tool_animate_scale( "Ramped", @ "Deformation", "", 0. )dump i_return_valuei_return_value = res_display_anim_setup_2d( 8, "Linear", "")dump i_return_valuei_return_value = res_display_anim_run( 100 )dump i_return_value#---------------------------------------------------------------------# Stop the running animation and display the next frame in queue.i_return_value = res_display_anim_step()dump i_return_value#---------------------------------------------------------------------# Create an image file of the current viewports_file_name = "IMAGE_FILE.img"i_return_value = @ res_display_anim_image_create @ ( s_file_name )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_display_anim_setup_image()## In this example field database, containing# the results is opened and a Deformation Plot# tool definition is created & posted in# default viewport. Parameters like method of# variation, interpolation and number of frames# are set and animation is started. Then# animation is stopped and 10 image files are# created using function,# res_display_anim_image_create(). Then this# function is called to setup the animation# with the created files.## Before running this file run field.ses to# create field.db## 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 res_display_anim_setup_image()# has the following arguments:## res_display_anim_setup_image# ( number_frames,# file_name )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_number_framesSTRING sa_file_name[32](10)INTEGER i_return_valueINTEGER i_count#---------------------------------------------------------------------# Open the database ’field.db’uil_file_open.go ("field.db")# Set ISO-1 viewingi_return_value = ga_view_aa_set( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create & Post Deformation Plot tooli_return_value = res_data_load_dbresult( 0, "Nodal", "Vector", @ "Default", "Static Subcase", "Displacements", @ "Translational", "(NON-LAYERED)", "", "Global", "", "", "" )dump i_return_valuei_return_value = res_data_title( 0, "Nodal", "Vector", 1, [ @ "Default, Static Subcase: Displacements, Translational-0"// @ " of 0 layers () "] )dump i_return_valuei_return_value = res_display_deformation_create( "", "Elements",@ 0, [""], 9, [ "DeformedStyle:White,Solid,1,Wireframe", @ "DeformedScale:Model=0.1", "UndeformedStyle:ON,"// @ "Blue,Solid,1,Wireframe", "TitleDisplay:ON", @ "MinMaxDisplay:ON", "ScaleFactor:1.", "LabelStyle:"// @ "Exponential, 12, White, 3", "DeformDisplay:Resultant", @ "DeformComps:OFF,OFF,OFF"] )dump i_return_valuei_return_value = res_display_deformation_post( "", 0 )dump i_return_value#---------------------------------------------------------------------# Set animation parameters and start animationi_return_value = res_display_tool_animate_scale( "Ramped", @ "Deformation", "", 0. )dump i_return_valuei_return_value = res_display_anim_setup_2d( 30, "Linear", "")dump i_return_valuei_return_value = res_display_anim_run( 100 )dump i_return_value# Stop animationi_return_value = res_display_anim_step()#---------------------------------------------------------------------# Create 10 image filesFOR ( i_count = 1 TO 10 ) dump i_count i_return_value = res_display_anim_frame( i_count ) dump i_return_value sa_file_name(i_count) = "IMAGE.img."//str_from_integer (i_count) dump sa_file_name(i_count) i_return_value = res_display_anim_image_create( @ sa_file_name(i_count)) dump i_return_valueEND FOR#---------------------------------------------------------------------# Set the details of animation framei_number_frames = 10i_return_value = @ res_display_anim_setup_image @ ( i_number_frames, @ sa_file_name )dump i_return_value# Start animation with modfield frame-seti_return_value = res_display_anim_run(100)#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_display_anim_bounds()## In this example field database, containing# the results is opened and a Deformation Plot# tool definition is created & posted in# default viewport. Parameters like method of# variation, interpolation and number of frames# are set and animation is started. After a# pause this function is called to set the# bounds of the animation frames.## Before running this file run field.ses to# create field.db## 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 res_display_anim_bounds()# has the following arguments:## res_display_anim_bounds# ( current_frame,# start_frame,# end_frame )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_current_frameINTEGER i_start_frameINTEGER i_end_frameINTEGER i_return_value#---------------------------------------------------------------------# Open the database ’field.db’uil_file_open.go ("field.db")# Set ISO-1 viewingi_return_value = ga_view_aa_set( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create & Post Deformation Plot tooli_return_value = res_data_load_dbresult( 0, "Nodal", "Vector", @ "Default", "Static Subcase", "Displacements", @ "Translational", "(NON-LAYERED)", "", "Global", "", "", "" )dump i_return_valuei_return_value = res_data_title( 0, "Nodal", "Vector", 1, [ @ "Default, Static Subcase: Displacements, Translational-0"// @ " of 0 layers () "] )dump i_return_valuei_return_value = res_display_deformation_create( "", "Elements",@ 0, [""], 9, [ "DeformedStyle:White,Solid,1,Wireframe", @ "DeformedScale:Model=0.1", "UndeformedStyle:ON,"// @ "Blue,Solid,1,Wireframe", "TitleDisplay:ON", @ "MinMaxDisplay:ON", "ScaleFactor:1.", "LabelStyle:"// @ "Exponential, 12, White, 3", "DeformDisplay:Resultant", @ "DeformComps:OFF,OFF,OFF"] )dump i_return_valuei_return_value = res_display_deformation_post( "", 0 )dump i_return_value#---------------------------------------------------------------------# Set animation parameters and start animationi_return_value = res_display_tool_animate_scale( "Ramped", @ "Deformation", "", 0. )dump i_return_valuei_return_value = res_display_anim_setup_2d( 30, "Linear", "" )dump i_return_valuei_return_value = res_display_anim_run( 10 )dump i_return_value#---------------------------------------------------------------------# Session file paused press "Resume" to continuesf_pause()#---------------------------------------------------------------------# Set the bounds of frames used by a running animationi_current_frame = 20i_start_frame = 15i_end_frame = 30i_return_value = @ res_display_anim_bounds @ ( i_current_frame, @ i_start_frame, @ i_end_frame )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_display_anim_method()## In this example field database, containing# the results is opened and a Deformation Plot# tool definition is created & posted in# default viewport. Parameters like method of# variation, interpolation and number of frames# are set and animation is started. After a# pause this function is called to modify the# method of paging from "Cycle" to "Bounce".## Before running this file run field.ses to# create field.db## 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 res_display_anim_method()# has the following arguments:## res_display_anim_method# ( method )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_method[16]INTEGER i_return_value#---------------------------------------------------------------------# Open the database ’field.db’uil_file_open.go ("field.db")# Set ISO-1 viewingi_return_value = ga_view_aa_set( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create & Post Deformation Plot tooli_return_value = res_data_load_dbresult( 0, "Nodal", "Vector", @ "Default", "Static Subcase", "Displacements", @ "Translational", "(NON-LAYERED)", "", "Global", "", "", "" )dump i_return_valuei_return_value = res_data_title( 0, "Nodal", "Vector", 1, [ @ "Default, Static Subcase: Displacements, Translational-0"// @ " of 0 layers () "] )dump i_return_valuei_return_value = res_display_deformation_create( "", "Elements",@ 0, [""], 9, [ "DeformedStyle:White,Solid,1,Wireframe", @ "DeformedScale:Model=0.1", "UndeformedStyle:ON,"// @ "Blue,Solid,1,Wireframe", "TitleDisplay:ON", @ "MinMaxDisplay:ON", "ScaleFactor:1.", "LabelStyle:"// @ "Exponential, 12, White, 3", "DeformDisplay:Resultant", @ "DeformComps:OFF,OFF,OFF"] )dump i_return_valuei_return_value = res_display_deformation_post( "", 0 )dump i_return_value#---------------------------------------------------------------------# Set animation parameters and start animationi_return_value = res_display_tool_animate_scale( "Ramped", @ "Deformation", "", 0. )dump i_return_valuei_return_value = res_display_anim_setup_2d( 30, "Linear", "" )dump i_return_valuei_return_value = res_display_anim_run( 10 )dump i_return_value#---------------------------------------------------------------------# Session file paused press "Resume" to continuesf_pause()#---------------------------------------------------------------------# Modify the method of paging from "Cycle" to "Bounce"s_method = "Bounce"i_return_value = @ res_display_anim_method @ ( s_method )dump i_return_value# Note the change in method of animation#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_display_anim_run()## In this example field database, containing# the results is opened and a Deformation Plot# tool definition is created & posted in# default viewport. Parameters like method of# variation, interpolation and number of frames# are set and animation is started using this# function. After a pause this function is# again called to animate with a increased# delay between frame display.## Before running this file run field.ses to# create field.db## 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 res_display_anim_run()# has the following arguments:## res_display_anim_run# ( delay )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_delayINTEGER i_return_value#---------------------------------------------------------------------# Open the database ’field.db’uil_file_open.go ("field.db")# Set ISO-1 viewingi_return_value = ga_view_aa_set( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create & Post Deformation Plot tooli_return_value = res_data_load_dbresult( 0, "Nodal", "Vector", @ "Default", "Static Subcase", "Displacements", @ "Translational", "(NON-LAYERED)", "", "Global", "", "", "" )dump i_return_valuei_return_value = res_data_title( 0, "Nodal", "Vector", 1, [ @ "Default, Static Subcase: Displacements, Translational-0"// @ " of 0 layers () "] )dump i_return_valuei_return_value = res_display_deformation_create( "", "Elements",@ 0, [""], 9, [ "DeformedStyle:White,Solid,1,Wireframe", @ "DeformedScale:Model=0.1", "UndeformedStyle:ON,"// @ "Blue,Solid,1,Wireframe", "TitleDisplay:ON", @ "MinMaxDisplay:ON", "ScaleFactor:1.", "LabelStyle:"// @ "Exponential, 12, White, 3", "DeformDisplay:Resultant", @ "DeformComps:OFF,OFF,OFF"] )dump i_return_valuei_return_value = res_display_deformation_post( "", 0 )dump i_return_value#---------------------------------------------------------------------# Use Linear Ramp variation for subsequent animationi_return_value = res_display_tool_animate_scale ( "Ramp", @ "Deformation", "", 0.0 )dump i_return_value# Specify number of frames and interpolation for 2D image animationi_return_value = res_display_anim_setup_2d ( 30, "Linear", "" )dump i_return_value#---------------------------------------------------------------------# Start running animation with delay of 10 milli-seconds per framei_delay = 10i_return_value = @ res_display_anim_run @ ( i_delay )dump i_return_value#---------------------------------------------------------------------# Session file paused press "Resume" to continuesf_pause()#---------------------------------------------------------------------# Start running animation with delay of 10 milli-seconds per framei_delay = 100i_return_value = @ res_display_anim_run @ ( i_delay )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of 2 calls to the# function res_display_anim_step()## In this example field database, containing# the results is opened and a Deformation Plot# tool definition is created & posted in# default viewport. Parameters like method of# variation, interpolation and number of frames# are set and animation is started. Then this# function is called twice with a pause# between each call to load successive frames.## Before running this file run field.ses to# create field.db## 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 res_display_anim_step() has no arguments.##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_return_value#---------------------------------------------------------------------# Open the database ’field.db’uil_file_open.go ("field.db")# Set ISO-1 viewingi_return_value = ga_view_aa_set( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create & Post Deformation Plot tooli_return_value = res_data_load_dbresult( 0, "Nodal", "Vector", @ "Default", "Static Subcase", "Displacements", @ "Translational", "(NON-LAYERED)", "", "Global", "", "", "" )dump i_return_valuei_return_value = res_data_title( 0, "Nodal", "Vector", 1, [ @ "Default, Static Subcase: Displacements, Translational-0"// @ " of 0 layers () "] )dump i_return_valuei_return_value = res_display_deformation_create( "", "Elements",@ 0, [""], 9, [ "DeformedStyle:White,Solid,1,Wireframe", @ "DeformedScale:Model=0.1", "UndeformedStyle:ON,"// @ "Blue,Solid,1,Wireframe", "TitleDisplay:ON", @ "MinMaxDisplay:ON", "ScaleFactor:1.", "LabelStyle:"// @ "Exponential, 12, White, 3", "DeformDisplay:Resultant", @ "DeformComps:OFF,OFF,OFF"] )dump i_return_valuei_return_value = res_display_deformation_post( "", 0 )dump i_return_value#---------------------------------------------------------------------# Set animation parameters and start animationi_return_value = res_display_tool_animate_scale( "Ramped", @ "Deformation", "", 0. )dump i_return_valuei_return_value = res_display_anim_setup_2d( 8, "Linear", "" )dump i_return_valuei_return_value = res_display_anim_run( 10 )dump i_return_value#---------------------------------------------------------------------# Session file paused press "Resume" to continuesf_pause()#---------------------------------------------------------------------# Stop the running animation and display the next frame in queue.i_return_value = res_display_anim_step()dump i_return_value#---------------------------------------------------------------------# Session file paused press "Resume" to continuesf_pause()# Note the change of the deformation plot on the default viewport.#---------------------------------------------------------------------# Display the next frame in queue.i_return_value = res_display_anim_step()dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of 2 calls to the# function res_display_anim_frame()## In this example field database, containing# the results is opened and a Deformation Plot# tool definition is created & posted in# default viewport. Parameters like method of# variation, interpolation and number of frames# are set and animation is started. Then this# function is called twice with a pause# between each call to load 10th and 25th frame.## Before running this file run field.ses to# create field.db## 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 res_display_anim_frame()# has the following arguments:## res_display_anim_frame# ( frame_number )##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_frame_numberINTEGER i_return_value#---------------------------------------------------------------------# Open the database ’field.db’uil_file_open.go ("field.db")# Set ISO-1 viewingi_return_value = ga_view_aa_set( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create & Post Deformation Plot tooli_return_value = res_data_load_dbresult( 0, "Nodal", "Vector", @ "Default", "Static Subcase", "Displacements", @ "Translational", "(NON-LAYERED)", "", "Global", "", "", "" )dump i_return_valuei_return_value = res_data_title( 0, "Nodal", "Vector", 1, [ @ "Default, Static Subcase: Displacements, Translational-0"// @ " of 0 layers () "] )dump i_return_valuei_return_value = res_display_deformation_create( "", "Elements",@ 0, [""], 9, [ "DeformedStyle:White,Solid,1,Wireframe", @ "DeformedScale:Model=0.1", "UndeformedStyle:ON,"// @ "Blue,Solid,1,Wireframe", "TitleDisplay:ON", @ "MinMaxDisplay:ON", "ScaleFactor:1.", "LabelStyle:"// @ "Exponential, 12, White, 3", "DeformDisplay:Resultant", @ "DeformComps:OFF,OFF,OFF"] )dump i_return_valuei_return_value = res_display_deformation_post( "", 0 )dump i_return_value#---------------------------------------------------------------------# Set animation parameters and start animationi_return_value = res_display_tool_animate_scale( "Ramped", @ "Deformation", "", 0. )dump i_return_valuei_return_value = res_display_anim_setup_2d( 30, "Linear", "lourdu" )dump i_return_valuei_return_value = res_display_anim_run( 10 )dump i_return_value#---------------------------------------------------------------------# Session file paused press "Resume" to continuesf_pause()#---------------------------------------------------------------------# Stop running animation and display the specified running frame.i_frame_number = 10i_return_value = @ res_display_anim_frame @ ( i_frame_number )dump i_return_value#---------------------------------------------------------------------# Session file paused press "Resume" to continuesf_pause()# Stop animationi_return_value = res_display_anim_step()dump i_return_value#---------------------------------------------------------------------# Display the specified running frame.i_frame_number = 25i_return_value = @ res_display_anim_frame @ ( i_frame_number )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_display_anim_clear()## In this example field database, containing# the results is opened and a Deformation Plot# tool definition is created & posted in# default viewport. Parameters like method of# variation, interpolation and number of frames# are set and animation is started. After a# pause this function is called to stop the# running animation and clear any stored# animation frames from memory.## Before running this file run field.ses to# create field.db## 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 res_display_anim_clear() has no arguments.##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_return_value#---------------------------------------------------------------------# Open the database ’field.db’uil_file_open.go ("field.db")# Set ISO-1 viewingi_return_value = ga_view_aa_set( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create & Post Deformation Plot tooli_return_value = res_data_load_dbresult( 0, "Nodal", "Vector", @ "Default", "Static Subcase", "Displacements", @ "Translational", "(NON-LAYERED)", "", "Global", "", "", "" )dump i_return_valuei_return_value = res_data_title( 0, "Nodal", "Vector", 1, [ @ "Default, Static Subcase: Displacements, Translational-0"// @ " of 0 layers () "] )dump i_return_valuei_return_value = res_display_deformation_create( "", "Elements",@ 0, [""], 9, [ "DeformedStyle:White,Solid,1,Wireframe", @ "DeformedScale:Model=0.1", "UndeformedStyle:ON,"// @ "Blue,Solid,1,Wireframe", "TitleDisplay:ON", @ "MinMaxDisplay:ON", "ScaleFactor:1.", "LabelStyle:"// @ "Exponential, 12, White, 3", "DeformDisplay:Resultant", @ "DeformComps:OFF,OFF,OFF"] )dump i_return_valuei_return_value = res_display_deformation_post( "", 0 )dump i_return_value#---------------------------------------------------------------------# Set animation parameters and start animationi_return_value = res_display_tool_animate_scale( "Ramped", @ "Deformation", "", 0. )dump i_return_valuei_return_value = res_display_anim_setup_2d( 30, "Linear", "lourdu" )dump i_return_valuei_return_value = res_display_anim_run( 10 )dump i_return_value#---------------------------------------------------------------------# Session file paused press "Resume" to continuesf_pause()#---------------------------------------------------------------------# Stop and clear stored animation frames from memoryi_return_value = res_display_anim_clear()dump i_return_value# Refresh Graphicsrepaint_graphics( )#---------------------------------------------------------------------() |
## Purpose : This file provides an example of 2 calls to the# function res_display_anim_active()## In this example field database, containing# the results is opened and a Deformation Plot# tool definition is created & posted in# default viewport. Then this function is# called before and after animation to check# whether animation is active or not.## Before running this file run field.ses to# create field.db## 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 res_display_anim_active() has no arguments.##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_return_valueLOGICAL l_return_value#---------------------------------------------------------------------# Open the database ’field.db’uil_file_open.go ("field.db")# Set ISO-1 viewingi_return_value = ga_view_aa_set( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create & Post Deformation Plot tooli_return_value = res_data_load_dbresult( 0, "Nodal", "Vector", @ "Default", "Static Subcase", "Displacements", @ "Translational", "(NON-LAYERED)", "", "Global", "", "", "" )dump i_return_valuei_return_value = res_data_title( 0, "Nodal", "Vector", 1, [ @ "Default, Static Subcase: Displacements, Translational-0"// @ " of 0 layers () "] )dump i_return_valuei_return_value = res_display_deformation_create( "", "Elements",@ 0, [""], 9, [ "DeformedStyle:White,Solid,1,Wireframe", @ "DeformedScale:Model=0.1", "UndeformedStyle:ON,"// @ "Blue,Solid,1,Wireframe", "TitleDisplay:ON", @ "MinMaxDisplay:ON", "ScaleFactor:1.", "LabelStyle:"// @ "Exponential, 12, White, 3", "DeformDisplay:Resultant", @ "DeformComps:OFF,OFF,OFF"] )dump i_return_valuei_return_value = res_display_deformation_post( "", 0 )dump i_return_value#---------------------------------------------------------------------# Query whether animation is active or notl_return_value = res_display_anim_active()dump l_return_value#--------------------------------------------------------------------# Session file paused press "Resume" to continuesf_pause()#---------------------------------------------------------------------# Set animation parameters and start animationi_return_value = res_display_tool_animate_scale( "Ramped", @ "Deformation", "", 0. )dump i_return_valuei_return_value = res_display_anim_setup_2d( 30, "Linear", "" )dump i_return_valuei_return_value = res_display_anim_run( 10 )dump i_return_value#---------------------------------------------------------------------# Query whether animation is active or notl_return_value = res_display_anim_active()dump l_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_display_cleanup()## In this example field database, containing# the results is opened and a Deformation Plot# tool definition is created & posted in# default viewport. After a pause this function# is called to clean the graphical display and# set graphics to wireframe state.## Before running this file run field.ses to# create field.db## 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 res_display_cleanup() has no arguments.##---------------------------------------------------------------------# Variable DeclarationsINTEGER i_return_value#---------------------------------------------------------------------# Open the database ’field.db’uil_file_open.go ("field.db")# Set ISO-1 viewingi_return_value = ga_view_aa_set( 23., -34., 0. )dump i_return_value#---------------------------------------------------------------------# Create & Post Deformation Plot tooli_return_value = res_data_load_dbresult( 0, "Nodal", "Vector", @ "Default", "Static Subcase", "Displacements", @ "Translational", "(NON-LAYERED)", "", "Global", "", "", "" )dump i_return_valuei_return_value = res_data_title( 0, "Nodal", "Vector", 1, [ @ "Default, Static Subcase: Displacements, Translational-0"// @ " of 0 layers () "] )dump i_return_valuei_return_value = res_display_deformation_create( "", "Elements",@ 0, [""], 9, [ "DeformedStyle:White,Solid,1,Wireframe", @ "DeformedScale:Model=0.1", "UndeformedStyle:ON,"// @ "Blue,Solid,1,Wireframe", "TitleDisplay:ON", @ "MinMaxDisplay:ON", "ScaleFactor:1.", "LabelStyle:"// @ "Exponential, 12, White, 3", "DeformDisplay:Resultant", @ "DeformComps:OFF,OFF,OFF"] )dump i_return_valuei_return_value = res_display_deformation_post( "", 0 )dump i_return_value#---------------------------------------------------------------------# Session file paused press "Resume" to continuesf_pause()#---------------------------------------------------------------------# Clean the graphical display and set graphics to wireframe statei_return_value = res_display_cleanup()dump i_return_value#---------------------------------------------------------------------