res_plot_set_create_over | ( plot_set_id, overwrite_plot_set, name, desc ) |
Description: | ||
This function creates a new Plot Set and persists it in the Patran database. An overwrite specifier is included to allow the command to overwrite an existing Plot Set if it uses the same name as the new name provided with this command. | ||
Input: | ||
LOGICAL | overwrite_plot_set | TRUE forces overwriting. FALSE causes the copy to fail if an existing Plot Set already uses the input new_name. |
STRING | name[max 79] | New Plot Set name. |
STRING | desc[VIRTUAL] | Plot Set description. |
Output: | ||
INTEGER | plot_set_id | Internal database ID of the newly created Plot Set. |
INTEGER | <Return Value> | Zero for success, else error message code. |
Error Conditions: | ||
MSG_RES_PLOT_SET_DOES_NOT_EXIST DbErrorNotFound DbOtherFailure |
res_plot_set_copy_over | ( new_id, overwrite_plot_set, new_name, new_desc, old_id, old_name ) |
Description: | ||
This function copies an existing Plot Set and persists it in the Patran database. An overwrite specifier is included to allow the command to overwrite an existing Plot Set if it uses the same name as the new name provided with this command. | ||
Input: | ||
LOGICAL | overwrite_plot_set | TRUE forces overwriting. FALSE causes the copy to fail if an existing Plot Set already uses the input new_name. |
STRING | new_name[max 79] | New Plot Set name. |
STRING | new_desc[VIRTUAL] | Plot Set description. |
INTEGER | old_id | Internal database id of the Plot Set to be copied. |
STRING | old_name[max 79] | Plot Set name to be copied. |
Output: | ||
INTEGER | new_id | Internal database ID of the newly created Plot Set. |
INTEGER | <Return Value> | Zero for success, else error message code. |
Error Conditions: | ||
MSG_RES_PLOT_SET_DOES_NOT_EXIST MSG_RES_PLOT_SET_LONG_NAME MSG_RES_PLOT_SET_NULL_NAME MSG_RES_PLOT_SET_EMPTY_NAME MSG_RES_PLOT_SET_BLANK_NAME MSG_RES_PLOT_INVALID_NAME DbErrorNotFound DbOtherFailure DbNotADatabase DbOutOfMemory |
res_create_plot_set_row | (row_id, plot_set_name, row_index, row_type_name, num_cols, a_col_vals, stride ) |
Description: | ||
This function creates a plots set’s row definition. | ||
Input: | ||
STRING | plot_set_name[max 79] | Plot Set name the row is associated to. |
INTEGER | row_index | Position of row within the Plot Set definition. |
STRING | row_type_name[ ] | Specification of the rows purpose. The options are: “Fringe Plot”, “Deformed Plot”, “Vector Plot”, “Tensor Plot”, “Image Data”, “Default Values”, “Column Order”, “Combined Plot”, and “Saved Plot”. |
INTEGER | num_cols | Number of data column sets that are required to support the row type. |
STRING | a_col_vals | Data required to support the row type. Each data column must have the following data within the column: column_type_name, num_values, value1, value2, ..., valueN. |
INTEGER | stride | The stride specifies how column data must be indexed. If the stride value is less than or equal to 0 then data indexing is assumed to be num_values + 2 strings. If stride is greater than 0 then the stride value represents the index jump size. This allows the data to be given in a two dimensional array. In this case stride is the size of the first dimension. It should be at least the largest of the num_values +2. The second dimension should be at least the number of columns in the row. |
Output: | ||
INTEGER | row_id | Internal database ID of the newly created Plot Set row. |
INTEGER | <Return Value> | Zero for success, else error message code. |
Error Conditions: | ||
MSG_RES_PLOT_SET_DOES_NOT_EXIST MSG_RES_PLOT_SET_LONG_NAME MSG_RES_PLOT_INVALID_NAME MSG_RES_PLOT_SET_NULL_NAME MSG_RES_PLOT_SET_EMPTY_NAME MSG_RES_PLOT_SET_BLANK_NAME DbInstanceNotFound DbOutOfMemory DbNotADatabase DbOtherFailure |
INTEGER plot_set_id, status
INTEGER row_id
STRING plot_set_name [ 79 ]
plot_set_name = "combo_plot_1"
status = res_plot_set_create_over( plot_set_id , FALSE , plot_set_name , @
"Deformed fringe plot" )
IF( status == 0 ) THEN
<lines that represent the Plot Set definition go here>
END IF
plot_set_id | An output variable the returns the id of the new Plot Set. |
FALSE (or TRUE) | A logical that specifies if the command is allowed to over write an existing Plot Set definition if the Plot Set names are identical. (TRUE = over write allowed) |
plot_set_name | The new Plot Set name to be created. |
Deformed fringe plot | The Plot Set’s text description. |
row_id | Output variable that returns the id of the new Plot Set row. |
plot_set_name | The Plot Set name that the row belongs to. |
1 | The row index within the Plot Set. |
Combined Plot | The row type. Options are, “Fringe Plot”, “Deformed Plot”, “Vector Plot”, “Tensor Plot”, “Image Data”, “Default Values”, Column Order”, “Combined Plot”, and “Saved Plot”. |
3 | The number of data columns that are needed to support the row type. |
Combined Plot Data Columns: | The data column syntax is defined to be, column_type_name, num_values, value1, value2, ..., valueN. Appendix B shows the data necessary to support the various row types. |
Num Combo Plots / Num Combo Rows / Iterator Type | |
These are the column_type_name selection for the combo plot row columns. They must be used in the order shown. | |
1 | Number of data specifications to follow. |
2 / 2 / product | The first value represents the number of plots that define the combination plot. The second value represents the number of total rows that are used to define the combination plot. The number of plots and the number of rows might be different since extra rows can be interspersed between the plot definition rows to alter global parameters that effect all plot types. In the first release, interspersed rows are not supported and the number of plots and rows should be the same. The final value, product, represents the iterator type used to generate the combined plots. Iterator types are described in detail in Appendix B. |
0 | The stride specifies how column data must be indexed. If the stride value is less than or equal to 0 then data indexing is assumed to be num_values + 2 strings. If stride is greater than 0 then the stride value represents the index jump size. This allows the data to be given in a two dimensional array. In this case stride is the size of the first dimension. It should be at least the largest of the num_values +2. The second dimension should be at least the number of columns in the row. |
The arguments of res_create_plot_set_row for the fringe plot specification are as follows. | |
row_id | Output variable that returns the id of the new Plot Set row. |
plot_set_name | The Plot Set name the row belongs to. |
2 | The row index within the Plot Set. |
Fringe Plot | The row type. Options are, “Fringe Plot”, “Deformed Plot”, “Vector Plot”, “Tensor Plot”, “Image Data”, “Default Values”, Column Order”, “Combined Plot”, and “Saved Plot”. |
14 | The number of data columns that are needed to support the row type. |
Fringe Plot Data Columns: | The data column syntax is defined to be, column_type_name, num_values, value1, value2,..., valueN. Since these are labeled data entries they can be entered in any order. Appendix B shows the data necessary to support the various row types. |
Loadcase | Column specification used to identify the analysis results data set. |
1 | Number of load cases. |
Combine | Load case name. |
Subcase | Column specification used to identify the analysis results data set. |
1 | Number of subcases. |
Subcase 3 | Subcase name. Used to identify the analysis results data. |
Primary Result | Column specification used to identify the primary results type name. |
1 | Number of primary results types. |
Nodal Vector | Primary specification of results to be rendered. Typical options are, “Displacement”, “Stress”, “Strain”, “Constraint Forces”, “Strain Energy”, etc. |
Secondary Result | Column specification used to identify the secondary results type name. |
1 | Number of secondary results types. |
Demo Result1 | Secondary specification of results to be rendered. Typical options are, “Translational”, “”, “Energy”, “Moment Resultant”, “Energy Density”, etc. |
Layer Location | Column specification used to identify the data layer location. |
1 | Number of layer ids specified for the plot. |
“ “ | Nonlayered data. Typical options are, “Z2”, “Layer 1”, “At Middle”, etc. |
Derived Quantity | Column specification used to identify the derivation to be applied to the analysis data. |
1 | Number of derivations specified. |
ZZ | Extract the ZZ component. Typical options are, “von Mises”, “tresca”, “Min Principal”, “Magnitude”, etc. |
Target | Column specification used to identify the of entities to render the plot upon. |
1 | Number of target specifications. |
FreeFaces,0 | Render on the nodes posted in the view port that lie on the element’s free faces. Typical options are, “Elements,0”, “Nodes,0”, etc. |
Template | Column specification used to identify the associated plot template that is to be retrieved to provide the plots graphics attributes and numerical operation options. |
1 | Number of templates that are specified. |
fringe_template | Template name to retrieve. |
Save As | Column specification used to allow the plot to be persisted with a name |
1 | Number of plot names specified |
“ “ | Blank specifier implies the default name will be used (e.g. default_Fringe). |
filename | Column specification used to allow the user to provide a print file name for the plot. |
1 | Number of print file names that are provided |
“ “ | If left blank as it is here the Plot Set name will be used as the default print file name. |
Title | Column specification that allows user to enter a plot title. |
1 | Number of title specifiers |
“ “ | Since a blank title has been specified the title that is specified in the template file will be used. Titles are limited to 159 characters. |
Range | Column specification of the range name that will be used for the plot. |
1 | Number of range specifiers |
“ “ | Since a blank range name has been specified the plot will use the range tool’s default range (e.g. Fri_default_Fringe, Vec_default_Vector, etc.). |
Spectrum | Specification of the spectrum name that will be used for the plot. |
1 | Number of spectrum specifiers |
“ “ | Since a blank spectrum name has been specified the plot will use the default spectrum (i.e. standard_spectrum). |
Viewport | Column specification of the viewport the plot will be rendered within. |
1 | Number of viewport specifiers |
“ “ | Since a blank viewport name has been specified the plot will be rendered in the current viewport. |
INTEGER plot_set_id, status |
INTEGER row_id |
STRING plot_set_name [ 79 ] |
plot_set_name = "combo_plot_1" |
status = res_plot_set_create_over( plot_set_id , FALSE , plot_set_name , @ |
"Deformed fringe plot" ) |
IF( status == 0 ) THEN |
res_create_plot_set_row( row_id , plot_set_name , 1 , @ |
"Combined Plot" , 3 , @ |
[ "Column Index" , "1" , @ |
"2" , @ |
"Column Index" , "1" , @ |
"2" , @ |
"Column Index" , "1" , @ |
"product" ] , 0 ) |
res_create_plot_set_row( row_id , plot_set_name , 2 , @ |
"Fringe Plot" , 14 , @ |
[ "Loadcase" , "1" , @ |
"Combine" , @ |
"Subcase" , "1" , @ |
"Subcase 3" , @ |
"Primary Result" , "1" , @ |
"Nodal Vector" , @ |
"Secondary Result" , "1" , @ |
"Demo Result1" , @ |
"Layer Location" , "1" , @ |
"" , @ |
"Derived Quantity" , "1" , @ |
"ZZ" , @ |
"Target" , "1" , @ |
"FreeFaces,0," , @ |
"Template" , "1" , @ |
"fringe_template" , @ |
"Save As" , "1" , @ |
"" , @ |
"Filename" , "1" , @ |
"" , @ |
"Title" , "1" , @ |
"" , @ |
"Range" , "1" , @ |
"" , @ |
"Spectrum" , "1" , @ |
"" , @ |
"Viewport" , "1" , @ |
"" ] , 0 ) |
res_create_plot_set_row( row_id , plot_set_name , 3 , @ |
"Deformed Plot" , 14 , @ |
[ "Loadcase" , "1" , @ |
"Derived Results" , @ |
"Subcase" , "2" , @ |
"Demo" , @ |
"DemoElem" , @ |
"Primary Result" , "1" , @ |
"Nodal Vector" , @ |
"Secondary Result" , "1" , @ |
"Demo Result1" , @ |
"Layer Location" , "1" , @ |
"" , @ |
"Show As" , "4" , @ |
"Resultant,x" , @ |
"Component,on,off,off" , @ |
"Component,off,on,off" , @ |
"Component,off,off,on" , @ |
"Target" , "2" , @ |
"Elements,0," , @ |
"Nodes,0," , @ |
"Template" , "1" , @ |
"def_tmpl" , @ |
"Save As" , "1" , @ |
"" , @ |
"Filename" , "1" , @ |
"" , @ |
"Title" , "2" , @ |
"$Use_Default_Title" , @ |
update_plotset_combined_data | ( set_name, row_name, iterator_type, num_rows, total_rows ) |
Description: | ||
Update a plot set Combined Plot row. | ||
Input: | ||
STRING | set_name[] | Plot Set name. |
STRING | row_name[] | Row name. |
STRING | iterator_type[] | Type of iterator, "Tuple" or "Product" |
INTEGER | num_rows | Number of "active" rows defining Combo Plot |
INTEGER | total_rows | Number of all rows defining Combo Plot |
Output: | ||
INTEGER | <Return Value> | Zero for success, else error message code. |
Error Conditions: | ||
See Error conditions: for more information. |
update_plotset_results_data | ( set_name, row_name, row_type, result_type, result_cases, results, derived_quantities, show_as, layers, rescase_combinations, layer_combinations ) |
Description: | ||
Update a plot set row with results data. | ||
Input: | ||
STRING | set_name[] | Plot Set name. |
STRING | row_name[] | Row name. |
STRING | row_type[] | Type of row, eg, "Fringe Plot" |
STRING | result_type[] | Type of result, eg "Nodal Vector" |
STRING | result_cases[]() | Result cases |
STRING | results[]() | Results |
STRING | derived_quantities[]() | Derived Quantities |
STRING | show_as[]() | Show as selections |
STRING | layers[]() | Layers |
STRING | rescase_combinations[]() | Result case combination methods |
STRING | layer_combinations[]() | Layer combination methods |
Output: | ||
INTEGER | <Return Value> | Zero for success, else error message code. |
Error Conditions: | ||
See Error conditions: for more information. |
update_plotset_results_data( "Combined_Fringe_Plots", "Fringe_Plots", @
"Fringe Plot", "Element Tensor", ["SKRUVAD INF|STNING, Static Subcase", @
"SKRUVAD INF|STNING-REVERSED, Static Subcase"], ["Stress Tensor"], [ @
"Von Mises", "X Component", "Y Component", "Max Principal"], [""], ["At Z1"], @
["NONE"], ["NONE"] )
update_plotset_attributes_data | ( set_name, row_name, templates, viewports, views, spectrums, ranges, tool_name, print_fname ) |
Description: | ||
Update a plot set row with Attributes data. | ||
Input: | ||
STRING | set_name[] | Plot set name |
STRING | row_name[] | Row name |
STRING | templates[]() | Result templates |
STRING | viewports[]() | Viewports |
STRING | views[]() | Views |
STRING | spectrums[]() | Spectrums name |
STRING | ranges[]() | Ranges |
STRING | tool_name[] | Tool name |
STRING | print_fname[] | Print filename |
Output: | ||
INTEGER | <Return Value> | Zero for success, else error message code. |
Error Conditions: | ||
See Error conditions: for more information. |
update_plotset_attributes_data( "Combined_Fringe_Plots", "Fringe_Plots", [ @
"Fringe_attribue_1", "Fringe_attribue_2"], ["default_viewport"], [ @
"isometric_view"], ["standard_spectrum"], ["standard_range"], "", "" )
update_plotset_targets_data | ( set_name, row_name, targets ) |
Description: | ||
Update a plot set row with Targets data. | ||
Input: | ||
STRING | set_name[] | Plot set name |
STRING | row_name[] | Row name |
STRING | targets[]() | Target sets |
Output: | ||
INTEGER | <Return Value> | Zero for success, else error message code. |
Error Conditions: | ||
See Error conditions: for more information. |
update_plotset_targets_data( "Combined_Fringe_Plots", "Fringe_Plots", [ @
"Current Viewport;Free Faces", "Elements;Free Faces;Elm 1:33 37:39 42:44 8" // @
"6 89 90 93 94 135:169 171:178 222 223 226 227 268:291 293:296 298:300 302" // @
":318 320:468 471:477 479 490:495 498 499 514:789 832 834 873:877:2 881 88" // @
"2 885:890 893:898 900:931 959:965:2 966:970 1007:1015:2 1016:1022 1059 10" // @
"63:1067:2 1068:1074 1102 1108:1117 1120:1125 1128:1133 1136:1141 1143:116" // @
"9 1203:1208 1245 1247 1253:1259 1261:1332 1341:1344 1351:1477"] )
update_plotset_image_data | ( set_name, row_name ) |
Description: | ||
Update a plot set row with image_data data. | ||
Input: | ||
STRING | set_name[] | Plot set name |
STRING | row_name[] | Row name |
Output: | ||
INTEGER | <Return Value> | Zero for success, else error message code. |
Error Conditions: | ||
rename_plotset | ( set_name, new_set_name, plotset_desc ) |
Description: | ||
Rename a plotset and/or change the description. | ||
Input: | ||
STRING | set_name[] | Plot set name |
STRING | new_set_name[] | New Plot Set Name |
STRING | row_name[] | Plot Set description |
Output: | ||
INTEGER | <Return Value> | Zero for success, else error message code. |
Error Conditions: | ||
See Error conditions: for more information. |
add_plotset_row | ( set_name, new_row_name, row_type ) |
Description: | ||
Add a plotset row to the end of a plotset. | ||
Input: | ||
STRING | set_name[] | Plot set name |
STRING | new_row_name[] | New Row Name |
STRING | row_type[] | Row Type |
Output: | ||
INTEGER | <Return Value> | Zero for success, else error message code. |
Error Conditions: | ||
See Error conditions: for more information. |
insert_plotset_row | ( t_name, new_row_name, row_type, position, target_row ) |
Description: | ||
Insert a plotset row in a plotset. | ||
Input: | ||
STRING | set_name[] | Plot Set Name |
STRING | new_row_name[] | New Row Name |
STRING | row_type[] | Row Type |
STRING | position[] | Position, "Before","After","Beginning","End" or "" |
STRING | target_row[] | Row Name to target Ignored if position is not "Before" or "After" Need more comments on optional args, etc. |
Output: | ||
INTEGER | <Return Value> | Zero for success, else error message code. |
Error Conditions: | ||
See Error conditions:, 1603 for more information. |
rename_plotset_row | ( set_name, source_row, new_row_name, row_type ) |
Description: | ||
Insert a plotset row in a plotset. | ||
Input: | ||
STRING | set_name[] | Plot Set Name |
STRING | source_row[] | Row name to Rename |
STRING | new_row_name[] | New Row Name Stays the same if blank |
STRING | row_type[] | Row Type Stays the same if blank |
STRING | target_row[] | Row Name to target Ignored if position is not "Before" or "After" Need more comments on optional args, etc. |
Output: | ||
INTEGER | <Return Value> | Zero for success, else error message code. |
Error Conditions: | ||
See Error conditions: for more information. |
move_plotset_row | ( set_name, source_row, position, target_row ) |
Description: | ||
Move a plot set row within a plot set. | ||
Input: | ||
STRING | set_name[] | Plot Set Name |
STRING | source_row[] | Row name to Move |
STRING | position[] | Position, "Before", "After","Beginning", "End", "" "Up", "Down" |
STRING | target_row[] | Row Name to target Ignored if position is not "Before" or "After" |
Output: | ||
INTEGER | <Return Value> | Zero for success, else error message code. |
Error Conditions: | ||
See Error conditions: for more information. |
move_plotset_rows | ( set_name, source_rows, position, target_row ) |
Description: | ||
Move a plot set row within a plot set. | ||
Input: | ||
STRING | set_name[] | Plot Set Name |
STRING | source_rows[] | Row name to Move |
STRING | position[] | Position, "Before", "After","Beginning", "End", "" "Up", "Down" |
STRING | target_row[] | Row Name to target Ignored if position is not "Before" or "After" |
Output: | ||
INTEGER | <Return Value> | Zero for success, else error message code. |
Error Conditions: | ||
See Error conditions: for more information. |
copy_plotset_row | ( set_name, source_row, new_row_name, position, target_row ) |
Description: | ||
Copy a plotset row within a plotset. | ||
Input: | ||
STRING | set_name[] | Plot Set Name |
STRING | source_row[] | Row name to copy |
STRING | new_row_name[] | New row name |
STRING | position[] | Position, "Before", "After","Beginning", "End", "" "Up", "Down" |
STRING | target_row[] | Row Name to target Ignored if position is not "Before" or "After" |
Output: | ||
INTEGER | <Return Value> | Zero for success, else error message code. |
Error Conditions: | ||
See Error conditions: for more information. |
delete_plotset_row | ( set_name, source_row ) |
Description: | ||
Delete a plotset row from a plotset. | ||
Input: | ||
STRING | set_name[] | Plot Set Name |
STRING | source_row[] | Row name to delete |
Output: | ||
INTEGER | <Return Value> | Zero for success, else error message code. |
Error Conditions: | ||
See Error conditions: for more information. |
delete_plotset_rows | ( set_name, source_rows ) |
Description: | ||
Delete plotset rows from a plotset. | ||
Input: | ||
STRING | set_name[] | Plot Set Name |
STRING | source_rows[] | Row name to delete |
Output: | ||
INTEGER | <Return Value> | Zero for success, else error message code. |
Error Conditions: | ||
See Error conditions: for more information. |
#define PLOTSET_UNEXPECTED_ERROR 1001
#define PLOTSET_DOES_NOT_EXIST 1002
#define PLOTSET_ROW_DOES_NOT_EXIST 1003
#define PLOTSET_ROW_INDEX_NOT_EXIST 1004
#define PLOTSET_ID_DOES_NOT_EXIST 1005
#define PLOTSET_ROW_STORE_FAILED 1006
#define PLOTSET_BAD_ROW_TYPE 1007
#define PLOTSET_BAD_RESULT_TYPE 1008
#define PLOTSET_SINGLE_STRING 1009
#define PLOTSET_BAD_ROW_TYPE_NAME 1010
#define PLOTSET_BAD_ROW_TYPE_ID 1011
#define PLOTSET_BAD_COL_TYPE_ID 1012
#define PLOTSET_ROW_UNEXPECTED_ERR 1013
#define PLOTSET_ROW_NEEDS_AT_LEAST_ONE 1014
#define PLOTSET_ROW_NO_DOUBLE_COMBOS 1015
#define PLOTSET_BAD_RESULTS_ROW_TYPE 1016
#define PLOTSET_UNKNOWN_RESULT_TYPE 1017
#define PLOTSET_UNSPECIFIED_RESULT_TYPE 1018
#define PLOTSET_BAD_ROW_ACTION 1019
#define PLOTSET_DUPLICATE_ROW_NAME 1020
#define PLOTSET_BLANK_ROW_NAME 1021
#define PLOTSET_ROW_DOESNT_EXIST 1022
#define PLOTSET_BAD_ROW_POSITION 1023
#define PLOTSET_TARGET_ROW_DOESNT_EXIST 1024
#define PLOTSET_TARGET_ROW_IS_BLANK 1025
#define PLOTSET_ROW_CHANGING_TYPES 1026
#define PLOTSET_ROW_IGNORED 1027
#define PLOTSET_ROW_NOTHING_TO_DELETE 1028
#define PLOTSET_REPEATED_ROW_NAME 1029
#define PLOTSET_NAME_IS_BLANK 1030
#define PLOTSET_ALREADY_EXISTS 1031
#define PLOTSET_ROW_NAME_DOES_NOT_EXIST 1032
#define PLOTSET_APPEND_ERROR 1033
#define PLOTSET_BAD_COMBO_ROW_TYPE 1034
#define PLOTSET_BAD_COMBO_ITERATOR 1035
#define PLOTSET_BAD_COL_TYPE_NAME 1036
#define PLOTSET_WRONG_COLUMN_COUNT 1037
#define PLOTSET_WRONG_COLUMN_TYPE 1038
#define PLOTSET_BAD_ITERATOR_TYPE 1039
#define PLOTSET_BAD_TEMPLATE_FOR_ROW 1040
#define PLOTSET_BAD_TARGET 1041
#define PLOTSET_BAD_TARGET2 1042
#define PLOTSET_NO_ATTRIBUTES 1043
#define PLOTSET_NO_TARGETS 1044
#define PLOTSET_BAD_PRINT_FNAME 1045