Zoes
Mechanical
- Sep 30, 2011
- 46
Hi
Would like some help with "writing" points of workpart in a _dat file in real time. So far the code bellow exports the points to a file and then closes it. Can we use a File Mode to keep the file open and still write on it?
Code:
Dim outFile As IO.StreamWriter
outFile = My.Computer.FileSystem.OpenTextFileWriter("C:\test.txt", False)
outFile.AutoFlush = True
outFile.WriteLine(thisPoint.Coordinates.X.ToString("F6") & ", ")
outFile.Close()
Would like some help with "writing" points of workpart in a _dat file in real time. So far the code bellow exports the points to a file and then closes it. Can we use a File Mode to keep the file open and still write on it?
Code:
Dim outFile As IO.StreamWriter
outFile = My.Computer.FileSystem.OpenTextFileWriter("C:\test.txt", False)
outFile.AutoFlush = True
outFile.WriteLine(thisPoint.Coordinates.X.ToString("F6") & ", ")
outFile.Close()