Exporting Time Histories in Text Format

The GRPH WRIT command can be used to write out the x and y values of x-y plots in the current view to a file as column data.

The following review script for example can be used to open an existing "model.flxhst" result file containing time history curves and converting this file into text format:

 
read f1 model.flxhst

grph 
	plot f1 1
	writ onex mydata.txt
	end

The option onex is here to specify that we want to export only the x-data values from the first curve with the y-data values form all curves. Otherwise, the x-data values from each curve will be written in column form.

This command will generate a text file such as the following one and with data ordered into columns:

text_file.png

Note: This code works only to export Time History curves into text.

The way to export arrays of data is explained here