jcop
07-14-2004, 05:36 AM
Hello,
I'm new to VB NET, already created some standard exe files which perfroms some calucations, now I want to figure out how to read a text file and store this into a grid.
The file is from FS2004, more specific the Traffic AI text file. below you will find an eg.
AC#1703,BUK,40%,WEEK,IFR,0/13:39:30,@0/19:28:57,340,F,0037,VIDP,0/21:00:00,@1/07:09:05,360,F,0037,EGLL
This file as you can see is commaseparated. What I need to know is how to write these i 2 variables.
AC#1703,
BUK,
40%,
WEEK,
IFR, are the only items which are static in each line. All the other info is giving me a headache. for instance, EGLL(last word in each line) is the departing airport. (this is something I can retrieve via a readline i Think)
But since each line is variable in lenght I don't know how to handle these.
Below the output I would like to get.
Aircraft | Reg | AI% | Freq | IFR/VFR | departure Airport | Arrival Airport
AC#1703 BUK 40% WEEK IFR EGLL VIDP
AC#1703 BUK 40% WEEK IFR VIDP EGLL
Departure Time | Arrival Time | Cruise | F | FlightNumber
13:39:90 19:28:57 340 F 0037
21:00:00 07:09:05 360 F 0037
As you can see some data needs to be read in a certain way so I can store this into something (array, variant, record??)
For more info on this structure I can point you out to the FS2004 SDK kit,
at following link.
http://www.microsoft.com/games/flightsimulator/fs2004_downloads_sdk.asp#traffic
Please note that I don't want a solution just something to get me started so I know for which subject I have to look for.
Kind regards,
Jcop
:confused:
I'm new to VB NET, already created some standard exe files which perfroms some calucations, now I want to figure out how to read a text file and store this into a grid.
The file is from FS2004, more specific the Traffic AI text file. below you will find an eg.
AC#1703,BUK,40%,WEEK,IFR,0/13:39:30,@0/19:28:57,340,F,0037,VIDP,0/21:00:00,@1/07:09:05,360,F,0037,EGLL
This file as you can see is commaseparated. What I need to know is how to write these i 2 variables.
AC#1703,
BUK,
40%,
WEEK,
IFR, are the only items which are static in each line. All the other info is giving me a headache. for instance, EGLL(last word in each line) is the departing airport. (this is something I can retrieve via a readline i Think)
But since each line is variable in lenght I don't know how to handle these.
Below the output I would like to get.
Aircraft | Reg | AI% | Freq | IFR/VFR | departure Airport | Arrival Airport
AC#1703 BUK 40% WEEK IFR EGLL VIDP
AC#1703 BUK 40% WEEK IFR VIDP EGLL
Departure Time | Arrival Time | Cruise | F | FlightNumber
13:39:90 19:28:57 340 F 0037
21:00:00 07:09:05 360 F 0037
As you can see some data needs to be read in a certain way so I can store this into something (array, variant, record??)
For more info on this structure I can point you out to the FS2004 SDK kit,
at following link.
http://www.microsoft.com/games/flightsimulator/fs2004_downloads_sdk.asp#traffic
Please note that I don't want a solution just something to get me started so I know for which subject I have to look for.
Kind regards,
Jcop
:confused: