() |
## Purpose : This file provides an example of a call to the# function res_display_fringe_post()## In this example field database, containing# the results is opened and a fringe plot# tool definition is created. After a pause# this function is called to post the# fringe plot tool in default viewport.## 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_fringe_post()# has the following arguments:## res_display_fringe_post# ( plot_name,# register_id,# register_location,# range_flag,# spectrum_flag )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_plot_name[32]INTEGER i_register_idSTRING s_register_location[32]LOGICAL l_range_flagLOGICAL l_spectrum_flagINTEGER 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 Fringe Plot tool for Displacementi_return_value = res_data_load_dbresult( 0, "Nodal", "Scalar", @ "Default", "Static Subcase", "Displacements","Translational",@ "(NON-LAYERED)", "MAG", "Default", "DeriveAverage", "All", @ "ShapeFunc" )dump i_return_valuei_return_value = res_data_title( 0, "Nodal", "Scalar", 1, [ @ "Default, Static Subcase: Displacements, Translational"// @ "-(NON-LAYERED) (MAG)"] )dump i_return_valuei_return_value = res_display_fringe_create( "", "FreeFaces", 0, @ [""], 12, [ "Range:Fri_default_Fringe", "RangeOverwrite:ON", @ "FringeStyle:Discrete/Smooth" , "Shade:None", @ "ElemEdge:FreeEdge,Blue,Solid,1", "Shrink:0", @ "TitleDisplay:ON", "MinMaxDisplay:ON", "ValueDisplay:OFF", @ "Filter:None", "ScaleFactor:1.", "LabelStyle:Fixed, 8, @ White, 4"], TRUE )dump i_return_value#---------------------------------------------------------------------# Session file paused press "Resume" to continuesf_pause()#---------------------------------------------------------------------# Plot Fringe Plot tool for Displacements_plot_name = ""i_register_id = 0s_register_location = "Nodal"l_range_flag = TRUEl_spectrum_flag = TRUEi_return_value = @ res_display_fringe_post @ ( s_plot_name, @ i_register_id, @ s_register_location, @ l_range_flag, @ l_spectrum_flag )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_display_vector_post()## In this example field database, containing# the results is opened and a Vector Plot# tool definition is created. After a pause# this function is called to post the# Vector Plot in default viewport.## 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_vector_post()# has the following arguments:## res_display_vector_post# ( plot_name,# register_id,# register_location,# range_flag,# spectrum_flag )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_plot_name[32]INTEGER i_register_idSTRING s_register_location[32]LOGICAL l_range_flagLOGICAL l_spectrum_flagINTEGER 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 Vector Plot tooli_return_value = res_data_load_dbresult( 0, "Nodal", "Vector", @ "Default", "Static Subcase", "Displacements","Translational",@ "(NON-LAYERED)", "", "AsIs", "", "", "", "", 0. )dump i_return_valuei_return_value = res_data_title( 0, "Nodal", "Vector", 1, @ [ "Default, Static Subcase, Displacements,"// @ " Translational, (NON-LAYERED)"] )dump i_return_valuei_return_value = res_display_vector_create( "", "Nodes", 0, @ [""], 16, [ "Range:Vec_default_Vector", "RangeOverwrite:ON", @ "VectorDisplay:Component", "VectorComps:OFF,OFF,ON", @ "VectorColors:Spectrum", "VectorScale:ScreenConstant=0.1", @ "VectorAttachment:Head", "HeadStyle:Single", @ "VectorStyle:Solid", "TailDisplay:ON", "TitleDisplay:ON", @ "MinMaxDisplay:ON", "LabelStyle:Fixed, 8, White, 4", @ "ValueDisplay:ON", "Filter:None", "ScaleFactor:1."], TRUE )dump i_return_value#---------------------------------------------------------------------# Session file paused press "Resume" to continuesf_pause()#--------------------------------------------------------------------# Post the created Vector Plot tools_plot_name = ""i_register_id = 0s_register_location = "Nodal"l_range_flag = TRUEl_spectrum_flag = TRUEi_return_value = @ res_display_vector_post @ ( s_plot_name, @ i_register_id, @ s_register_location, @ l_range_flag, @ l_spectrum_flag )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_display_tensor_post()## In this example field database, containing# the results is opened and a tensor plot# tool definition is created. After a pause# this function is called to post the# tensor plot in default viewport.## 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_tensor_post()# has the following arguments:## res_display_tensor_post# ( plot_name,# register_id,# register_location,# range_flag,# spectrum_flag )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_plot_name[32]INTEGER i_register_idSTRING s_register_location[32]LOGICAL l_range_flagLOGICAL l_spectrum_flagINTEGER 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 Tensor plot tooli_return_value = res_data_load_dbresult( 0, "Centroidal", @ "Tensor", "Default", "Static Subcase" , "Stress Tensor", "", @ "At Z1", "", "AsIs", "DeriveAverage", "All", "ShapeFunc", "",@ 0. )dump i_return_valuei_return_value = res_data_title( 0, "Centroidal", "Tensor", 1, @ [ "Default, Static Subcase, Stress Tensor,, At Z1"] )dump i_return_valuei_return_value = res_display_tensor_create( "", "Elements", 0, @ [""], 17, [ "Range:Ten_default_Tensor", "RangeOverwrite:ON", @ "TensorDisplay:Component", "TensorComps:ON,ON,ON,ON,ON,ON", @ "TensorColors:Blue,Green,Yellow,Red,Magenta,White", @ "VectorScale:ScreenConstant=0.1", "HeadStyle:Single", @ "VectorStyle:Solid", "BoxStyle:ON,Wireframe", @ "BoxColor:Yellow", "BoxScale:ScreenConstant=0.1", @ "TitleDisplay:ON", "MinMaxDisplay:ON", "LabelStyle:Fixed, 8, @ White, 4", "ValueDisplay:ON", "Filter:None", @ "ScaleFactor:1."], TRUE )dump i_return_value#---------------------------------------------------------------------# Session file paused press "Resume" to continuesf_pause()#--------------------------------------------------------------------# Post the created tensor plot tools_plot_name = ""i_register_id = 0s_register_location = "Centroidal"l_range_flag = TRUEl_spectrum_flag = FALSEi_return_value = @ res_display_tensor_post @ ( s_plot_name, @ i_register_id, @ s_register_location, @ l_range_flag, @ l_spectrum_flag )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_display_report_write()## In this example field database, containing# the results is opened and a file named# RESULT_REPORT.prt is created. Then report# tool definition is created and this function# is called to write Z-displacements of node# into file RESULT_REPORT.prt## 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_report_write()# has the following arguments:## res_display_report_write# ( report_name,# register_id,# register_type,# register_location,# output_method,# file_name )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_report_name[32]INTEGER i_register_idSTRING s_register_type[32]STRING s_register_location[32]STRING s_output_method[32]STRING s_file_name[32]INTEGER i_return_value#---------------------------------------------------------------------# Open the database ’field.db’uil_file_open.go ("field.db")# Open a new file for writinguil_file_report.open_file( "RESULT_REPORT.prt", 80 )#---------------------------------------------------------------------# Create report tool definitioni_return_value = res_data_load_dbresult( 0, "Nodal", "Vector", @ "Default", "Static Subcase", "Displacements","Translational", @ "(NON-LAYERED)", "", "AsIs", "", "", "", "", 0. )dump i_return_valuei_return_value = res_display_report_create( "","Nodes", 0, [""], @ 18, ["ReportType:Full", "ReportTitle:$PRODUCT - Analysis"// @ " Code: $CODE_NAME","ReportTitle:Load Case: $LC_NAME, $SC_NAME", @ "ReportTitle:Result $PRES_NAME, $SRES_NAME - Layer $LYR_NAME ", @ "ReportTitle:Entity: Node Vector", "ReportHeader:Page $PAGE", @ "ReportFooter:$DATE", "ReportPage:Height=52,Width=70,"// @ "TopMargin=5,LeftMargin=8,BottomMargin=5", @ "ReportPagination:OFF", "ReportPageNumber:1", @ "ReportPageAlignment:Center","ReportVColumn:1,Entity ID,ID,%I6%",@ "ReportVColumn:2,Z Component,ZZ,%F12.6%", "EntitySort:LoadCase", @ "ValueSort:1,Ascending,Algebraic", "ColumnHeaders:ON", @ "Filter:None", "ScaleFactor:1."] )dump i_return_value#---------------------------------------------------------------------# Write report tool definition to "RESULT_REPORT.prt"s_report_name = ""i_register_id = 0s_register_type = "Vector"s_register_location = "Nodal"s_output_method = "Overwrite"s_file_name = "RESULT_REPORT.prt" i_return_value = @ res_display_report_write @ ( s_report_name, @ i_register_id, @ s_register_type, @ s_register_location, @ s_output_method, @ s_file_name )dump i_return_value# A physical file "RESULT_REPORT.prt" is created in current# directory#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_display_graph_post()## In this example field database, containing# the results is opened and a graph plot# tool definition is created. After a pause# this function is called to post the# graph plot.## 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_graph_post()# has the following arguments:## res_display_graph_post# ( plot_name,# register_location,# y_register_id,# x_register_id,# plot_title,# append_flag )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_plot_name[32]STRING s_register_location[32]INTEGER i_y_register_idINTEGER i_x_register_idSTRING s_plot_title[32]LOGICAL l_append_flagINTEGER 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 Graph Plot tool for Displacementi_return_value = res_data_load_dbresult( 0, "Centroidal", @ "Scalar", "Default", "Static Subcase", "Displacements", @ "Translational", "(NON-LAYERED)", "MAG", "AsIs", "", "", "", @ "", 0. )dump i_return_valuei_return_value = res_data_title( 0, "Centroidal", "Scalar", 1, @ ["Displacements, Translational, MAG"] )dump i_return_valuei_return_value = res_display_graph_create( "", "DataLocation", @ "Elements", 1, [ "EL:Elm 11:13 16:18 21:23"], 14, @ ["curveFitMethod:Linear", "curveStyle:Solid", @ "symbolDisplay:OFF", "xAxisLabelDisplay:ON", @ "xAxisLabel:Coord 0.1", "xAxisScale:Linear", @ "xAxisLabelFormat:Fixed, 12, White, 4", @ "yAxisLabelDisplay:ON", "yAxisLabel:Element Tensor,"// @ " Demo Result1", "yAxisScale:Linear", "yAxisLabelFormat:"// @ "Fixed, 12, White, 4", "ScaleFactor:1.", "Filter:None", @ "LocationCID:Coord 0.1", ""] )dump i_return_value#---------------------------------------------------------------------# Session file paused press "Resume" to continuesf_pause()#---------------------------------------------------------------------# Post Graph Plot tool for Displacements_plot_name = ""s_register_location = "Centroidal"i_y_register_id = 0i_x_register_id = -1s_plot_title = "EXAMPLE GRAPH"l_append_flag = FALSEi_return_value = @ res_display_graph_post @ ( s_plot_name, @ s_register_location, @ i_y_register_id, @ i_x_register_id, @ s_plot_title, @ l_append_flag )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_display_tool_unpost()## In this example field database, containing# the results is opened and a Fringe Plot# tool definition is created & posted in# default viewport. After a pause this function# is called to unpost the Fringe Plot tool.## 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_tool_unpost()# has the following arguments:## res_display_tool_unpost# ( plot_type,# plot_name )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_plot_type[32]STRING s_plot_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 and Post Fringe Plot tool for Displacementi_return_value = res_data_load_dbresult( 0, "Nodal", "Scalar", @ "Default", "Static Subcase", "Displacements","Translational",@ "(NON-LAYERED)", "MAG", "Default", "DeriveAverage", "All", @ "ShapeFunc" )dump i_return_valuei_return_value = res_data_title( 0, "Nodal", "Scalar", 1, [ @ "Default, Static Subcase: Displacements, Translational"// @ "-(NON-LAYERED) (MAG)"] )dump i_return_valuei_return_value = res_display_fringe_create( "", "FreeFaces", 0, @ [""], 12, [ "Range:Fri_default_Fringe", "RangeOverwrite:ON", @ "FringeStyle:Discrete/Smooth" , "Shade:None", @ "ElemEdge:FreeEdge,Blue,Solid,1", "Shrink:0", @ "TitleDisplay:ON", "MinMaxDisplay:ON", "ValueDisplay:OFF", @ "Filter:None", "ScaleFactor:1.", "LabelStyle:Fixed, 8, @ White, 4"], TRUE )dump i_return_valuei_return_value = res_display_fringe_post ( "", 0, "Nodal", TRUE,@ TRUE )dump i_return_value#---------------------------------------------------------------------# Session file paused press "Resume" to continuesf_pause()#---------------------------------------------------------------------# Unpost the Fringe Plot tools_plot_type = "Fringe"s_plot_name = "default_Fringe"i_return_value = @ res_display_tool_unpost @ ( s_plot_type, @ s_plot_name )dump i_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of 2 calls to the# function res_display_tool_exist()# # In this example field database, containing# the results is opened and this function is# called to check the existence of Fringe Plot# tool. After a pasue the Fringe Plot tool# definition is created & posted in default# viewport. Then this function is again called# to check the existence of Fringe Plot tool.## 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_tool_exist()# has the following arguments:## res_display_tool_exist# ( plot_type,# plot_name )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_plot_type[32]STRING s_plot_name[32]INTEGER 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#---------------------------------------------------------------------# Check the existence of mentioned tools_plot_type = "Fringe"s_plot_name = "default_Fringe"l_return_value = @ res_display_tool_exist @ ( s_plot_type, @ s_plot_name )dump l_return_value#---------------------------------------------------------------------# Session file paused press "Resume" to continuesf_pause()#---------------------------------------------------------------------# Create and Post Fringe Plot tool for Displacementi_return_value = res_data_load_dbresult( 0, "Nodal", "Scalar", @ "Default", "Static Subcase", "Displacements","Translational",@ "(NON-LAYERED)", "MAG", "Default", "DeriveAverage", "All", @ "ShapeFunc" )dump i_return_valuei_return_value = res_data_title( 0, "Nodal", "Scalar", 1, [ @ "Default, Static Subcase: Displacements, Translational"// @ "-(NON-LAYERED) (MAG)"] )dump i_return_valuei_return_value = res_display_fringe_create( "", "FreeFaces", 0, @ [""], 12, [ "Range:Fri_default_Fringe", "RangeOverwrite:ON", @ "FringeStyle:Discrete/Smooth" , "Shade:None", @ "ElemEdge:FreeEdge,Blue,Solid,1", "Shrink:0", @ "TitleDisplay:ON", "MinMaxDisplay:ON", "ValueDisplay:OFF", @ "Filter:None", "ScaleFactor:1.", "LabelStyle:Fixed, 8, @ White, 4"], TRUE )dump i_return_valuei_return_value = res_display_fringe_post ( "", 0, "Nodal", TRUE,@ TRUE )dump i_return_value#---------------------------------------------------------------------# Check the existence of mentioned tooll_return_value = @ res_display_tool_exist @ ( s_plot_type, @ s_plot_name )dump l_return_value#---------------------------------------------------------------------() |
## Purpose : This file provides an example of a call to the# function res_display_tool_delete()## In this example field database, containing# the results is opened and a Fringe Plot# tool definition is created. Then this# function is called to delete the Fringe Plot# tool. The deletion of the result-tool is# verified by getting the existence of the tool# before and after deletion.## 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_tool_delete()# has the following arguments:## res_display_tool_delete# ( plot_type,# plot_name )##---------------------------------------------------------------------# Variable DeclarationsSTRING s_plot_type[32]STRING s_plot_name[32]INTEGER 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 Fringe Plot tool for Displacementi_return_value = res_data_load_dbresult( 0, "Nodal", "Scalar", @ "Default", "Static Subcase", "Displacements","Translational",@ "(NON-LAYERED)", "MAG", "Default", "DeriveAverage", "All", @ "ShapeFunc" )dump i_return_valuei_return_value = res_data_title( 0, "Nodal", "Scalar", 1, [ @ "Default, Static Subcase: Displacements, Translational"// @ "-(NON-LAYERED) (MAG)"] )dump i_return_valuei_return_value = res_display_fringe_create( "", "FreeFaces", 0, @ [""], 12, [ "Range:Fri_default_Fringe", "RangeOverwrite:ON", @ "FringeStyle:Discrete/Smooth" , "Shade:None", @ "ElemEdge:FreeEdge,Blue,Solid,1", "Shrink:0", @ "TitleDisplay:ON", "MinMaxDisplay:ON", "ValueDisplay:OFF", @ "Filter:None", "ScaleFactor:1.", "LabelStyle:Fixed, 8, @ White, 4"], TRUE )dump i_return_value#---------------------------------------------------------------------# Check the existence of Fringe Plot tooll_return_value = res_display_tool_exist( "Fringe", @ "default_Fringe" )dump l_return_value#---------------------------------------------------------------------# Delete the Fringe Plot tools_plot_type = "Fringe"s_plot_name = "default_Fringe"i_return_value = @ res_display_tool_delete @ ( s_plot_type, @ s_plot_name )dump i_return_value#---------------------------------------------------------------------# Check the existence of Fringe Plot tooll_return_value = res_display_tool_exist( "Fringe", @ "default_Fringe" )dump l_return_value#---------------------------------------------------------------------