CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   CD-adapco (http://www.cfd-online.com/Forums/cd-adapco/)
-   -   reading values from a text file into a java macro (http://www.cfd-online.com/Forums/cd-adapco/56632-reading-values-text-file-into-java-macro.html)

Jayson Martinez May 22, 2008 17:44

reading values from a text file into a java macro
 
Does anyone know how to read values from a text file (*.csv file exported by the report monitor) into a java macro for STAR-CCM+?

I have tried using the Scanner and the FileInputStream, but honestly I am not sure if I am doing it correctly. I keep getting that the file cannot be found.

If anybody happens to have an example doing this, that they wouldn't mind sharing, I would greatly appreciate it.

Thanks,

Jayson

Jayson May 23, 2008 17:58

[Solved] reading values from a text file...
 
I have figured out how to do it, I needed to read in the text file as a table, and use the java command getTableDataItem(int,int) to read the value into my macro as a String.


All times are GMT -4. The time now is 07:52.