So I have been working with Microsoft Visual Basic 2005 Express to try to learn more VB for Autocad.
I have been writing a little application that takes a text file that is output from one of my Hydrology programs (civil design), and converts it into a form that can be used in my flood modeling software (Flo-2d). So I have set up my application to use the readline procedure of the file stream class, and for the most part it works. The text I need for my new file is not always in the same place, so I have to search the text line by line and use the Indexof string procedure to search each line for key words.
The problem I have right now is that it seems that the readline procedure only goes one way. Is there a way to get the place holder that is used with readline to back up a line, or to return to the start of the file? I tried using myStreamReader.BaseStream.Seek(0, IO.SeekOrigin.Begin) ,but it does not seem to affect where readline reads from.
Is there any way of getting readline to go up a line or two without closing and re-opening the file?
One last question. Does readline return a -1 if the line is blank? Meaning it only has a CR character on it.