top of page

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


Recent Posts

See All
Reading a csv file by using tcl

Reading a csv file procedure is similar to the other programming languages. # Open the CSV file in read mode set filePath...

 
 
 

1 Comment

Rated 0 out of 5 stars.
No ratings yet

Add a rating
Guest
Jul 09
Rated 5 out of 5 stars.

It is practical to use csv file to plot. I added to capture image to this code.

Like

© 2023

 
bottom of page