Creating RF plot in hypermesh
- Admin
- Jun 24
- 1 min read
After doing analytical calculations, the RF plots will be useful for reports and presentation. Here is the tcl codes for creating RF plot in hypermesh by TCL.
# Ask the user to select a CSV fileset
filename [tk_getOpenFile -filetypes {{"CSV Files" {.csv}}} -title "Select CSV File"]
# If no file is selected, stop the script
if { [string length $filename] == 0 } {
puts "No file is selected"
return
}
# Open the file for reading
set file [open $filename "r"]
# Create a table which name is "table1" with 2 column, 2 string headers
*createstringarray 2 INT DOUBLE
*tablecreate table1 3 1 1 2
*createstringarray 2 "Elements" "RF"
*tableupdateables table1 1 2
# Set labels and visual options
*tablecontour table1 Elements RF "RF PLOT"
*setoption legend_colormap_divergent=0
It is practical to use csv file to plot. I added to capture image to this code.