CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Siemens (https://www.cfd-online.com/Forums/siemens/)
-   -   How to read a file from a macro (https://www.cfd-online.com/Forums/siemens/53883-how-read-file-macro.html)

StarCD July 7, 2004 16:17

How to read a file from a macro
 
Hi everyone,

I have a text file with x and y vertex co-ordinates of a geometry. I would like to write a macro to read from this file. How do I do this? Someone mentinoed something about IFILE command. I need more detail as I dont know much about writing the macro apart from the simplest terms.

Please help.

Thanx, StarCD

steve July 8, 2004 22:29

Re: How to read a file from a macro
 
A macro can have any set of std prostar commands. The prostar command for entering vertices is

V,vertex#,x,y,z

If you modify your file to the lines above, rename it casename.inp and then use ifile,, you can read in those numbers. However, if all you want to do is just read in coordinates, you would be better off looking at the help for the VREAD command and put your file in the format that VREAD looks for.

StarCD July 8, 2004 22:31

Re: How to read a file from a macro
 
Thank you Steve :)


All times are GMT -4. The time now is 01:31.