| Building a Console Application in VB for the Alibre Design API - Redirecting the Standard Output |
|
|
Page 9 of 14 Redirecting the Standard OutputThe next bit of code will redirect any output that would have normally gone to the screen to a file instead -- but only if we have an output path to use. If an output path or the "-out:" flag wasn't included as a command line argument, then the output will just go to the screen. ' Redirect standard out to filestream
Dim outStream As StreamWriter
If outPath.Length > 0 Then
outStream = New StreamWriter(outPath)
Console.SetOut(outStream)
End If
|
|
| Last Updated ( Monday, 28 January 2008 16:22 ) |
