airbase.CSV -> airport.TDF file conversion

F4Browse, CATE, Tacedit, Terrainview & TheaterMaker etc utility related

Moderators: Lone Wolf, Snake Man

Snake Man
Commander-In-Chief
Posts: 9351
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

airbase.CSV -> airport.TDF file conversion

Post by Snake Man » 2007-03-23 08:15:39

I'm getting pissed off as Dem2terrain / Terrainview airport TDF file is not identical to the modified Tacedit airbase csv export file. Therefore when I load up terrainview to inspect newly created airbase tiling and click on that white or yellow dot of airbase... many times it happens its not there as its been removed from one reason or another (Red Dogs airbase work or whatever). Its frustrating.

It would be great to have the dem2terrain created airport.TDF file identical to the tacedit airbase.csv file.

This is the dem2terrain created airport.TDF file:

Code: Select all

AIRPORT 1 1780,1213 4 HERAT                                   
AIRPORT 1 1790,1123 3 SHINDAND                                
AIRPORT 1 206,1980 5 KALININO                                
AIRPORT 1 218,1969 5 STEPANAVAN                              
AIRPORT 1 306,1960 5 BERD                                    
AIRPORT 1 169,1943 5                                         
AIRPORT 1 270,1899 5 KAMO                                    
AIRPORT 1 223,1892 5 YEREVAN-YEGVARD                         
AIRPORT 1 324,1880 5 METS MAZRA                              
AIRPORT 1 208,1875 5 YEREVAN-PARAKAR                         
AIRPORT 1 213,1872 5                                         
AIRPORT 1 163,1867 5 OKTEMBER HIGHWAY STRIP                  
AIRPORT 1 339,1807 4 SISIAN                                  
AIRPORT 1 366,1797 4 SHINUYAR                                
AIRPORT 1 372,1768 4                                         
AIRPORT 1 413,2032 5 ZAKATALY                                
AIRPORT 1 592,2021 5 KHACHMAS                                
AIRPORT 1 451,1984 5                                         
AIRPORT 1 305,1983 5                                         
AIRPORT 1 347,1956 5 DALLYAR                                 
AIRPORT 1 638,1948 5 SITAL CHAY                              
AIRPORT 1 377,1940 5                                         
AIRPORT 1 422,1940 5 TANRYKULULAR                            
AIRPORT 1 381,1940 5 KIROVABAD NORTH                         
AIRPORT 1 409,1938 5 KYRVKHLY                                
AIRPORT 1 476,1932 5                                         
AIRPORT 1 445,1928 5                                         
AIRPORT 1 496,1928 5                                         
AIRPORT 1 529,1927 5 KUBA KHALILLI                           
AIRPORT 1 648,1924 5 NASOSNYY                                
AIRPORT 1 502,1917 5 BYGYR                                   
And here is the same theaters tacedit airbase.csv file:

Code: Select all

PARSSABAD, Airbase, 11_29 Airbase, 4, 1775, 499, 1813, 0, 0, 0, 0, 6, 4, 0, 82944, 0, 0, 0, 17, 40, 0, 6, 0, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 
TABRIZ, Airbase, 12_30 Airbase Rvr, 5, 1776, 345, 1650, 0, 0, 0, 0, 6, 5, 0, 82944, 0, 0, 0, 17, 40, 0, 6, 4, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 18, 16, 48, 32, 24, 22, 255, 255, 13785, 11, 5, 12, 9, 4, 4, 255, 255, 178, 8, 5, 17, 11, 9, 9, 255, 255, 13734, 11, 8, 26, 17, 12, 12, 255, 255, 160, 
SARAB, Airbase, 23_05 Airbase 2 Rvr, 6, 1779, 468, 1628, 0, 0, 0, 0, 6, 6, 0, 82944, 0, 0, 0, 27, 40, 0, 6, 0, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 
UROMIYEH, Airbase, 21_03 Airbase, 7, 1778, 237, 1598, 0, 0, 0, 0, 6, 7, 0, 82944, 0, 0, 0, 17, 40, 0, 6, 0, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 
SOGA, Airbase, 23_05 Airbase 2 Rvr, 8, 1779, 1215, 1594, 0, 0, 0, 0, 6, 8, 0, 82944, 0, 0, 0, 27, 40, 0, 6, 0, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 
KALALEH, Airbase, 23_05 Airbase 2 Rvr, 9, 1779, 1152, 1567, 0, 0, 0, 0, 6, 9, 0, 82944, 0, 0, 0, 27, 40, 0, 6, 0, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 
MARAGHEH HIGHWAY STRIP, Airbase, 23_05 Airbase 2 Rvr, 10, 1779, 327, 1562, 0, 0, 0, 0, 6, 10, 0, 82944, 0, 0, 0, 27, 40, 0, 6, 0, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 
RASHT, Airbase, 26_08 Airbase Rvr, 11, 1780, 635, 1560, 0, 0, 0, 0, 6, 11, 0, 82944, 0, 0, 0, 17, 40, 0, 6, 0, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 
RAMSAR, Airstrip, Highway Strip NS, 12, 226, 728, 1514, 0, 0, 0, 0, 6, 12, 0, 0, 0, 0, 0, 4, 40, 0, 6, 0, 0 0 0 0 0, 
NOSHAHR, Airstrip, Highway Strip EW, 13, 1807, 797, 1487, 0, 0, 0, 0, 6, 13, 0, 82944, 0, 0, 0, 4, 40, 0, 6, 0, 0 0 0 0 0, 
BISHEH KOLA, Airstrip, Highway Strip EW, 14, 1807, 876, 1486, 0, 0, 0, 0, 6, 14, 0, 82944, 0, 0, 0, 4, 40, 0, 6, 0, 0 0 0 0 0, 
DASHTE NAZ, Airbase, 34_16 Airbase Rvr, 15, 1783, 951, 1484, 0, 0, 0, 0, 6, 15, 0, 82944, 0, 0, 0, 17, 40, 0, 6, 0, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 
SARAKHS SOUTH, Airbase, 23_05 Airbase 2 Rvr, 16, 1779, 1655, 1465, 0, 0, 0, 0, 6, 16, 0, 82944, 0, 0, 0, 27, 40, 0, 6, 1, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 19, 16, 46, 33, 11, 11, 255, 255, 852, 
SHAHRUD, Airbase, 23_05 Airbase 2 Rvr, 17, 1779, 1122, 1460, 0, 0, 0, 0, 6, 17, 0, 82944, 0, 0, 0, 27, 40, 0, 6, 0, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 
GHAZVIN, Airstrip, Highway Strip EW, 18, 1807, 669, 1440, 0, 0, 0, 0, 6, 18, 0, 82944, 0, 0, 0, 4, 40, 0, 6, 0, 0 0 0 0 0, 
MASHHAD, Airbase, 23_05 Airbase 2 Rvr, 19, 1779, 1529, 1439, 0, 0, 0, 0, 6, 19, 0, 82944, 0, 0, 0, 27, 40, 0, 6, 0, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 
SABZEVAR, Airbase, 23_05 Airbase 2 Rvr, 20, 1779, 1356, 1434, 0, 0, 0, 0, 6, 20, 0, 82944, 0, 0, 0, 27, 40, 0, 6, 0, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 
KARAJ, Airbase, 12_30 Airbase Rvr, 21, 1776, 741, 1387, 0, 0, 0, 0, 6, 21, 0, 82944, 0, 0, 0, 17, 40, 1158, 6, 3, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 26, 22, 67, 44, 36, 34, 255, 255, 1150, 8, 3, 10, 6, 4, 4, 255, 255, 13042, 16, 11, 31, 21, 12, 12, 255, 255, 1158, 
TEHRAN WEST, Airbase, 23_05 Airbase 2 Rvr, 22, 1779, 773, 1384, 0, 0, 0, 0, 6, 22, 0, 82944, 0, 0, 0, 27, 40, 1211, 6, 1, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 5, 3, 8, 6, 4, 4, 255, 255, 1211, 
DOSHAN TAPPEH, Airstrip, Highway Strip EW, 23, 1807, 796, 1380, 0, 0, 0, 0, 6, 23, 0, 82944, 0, 0, 0, 4, 40, 0, 6, 4, 0 0 0 0 0, 13, 6, 15, 12, 6, 5, 255, 255, 9007, 10, 6, 16, 11, 7, 6, 255, 255, 1181, 14, 12, 25, 21, 9, 9, 255, 255, 1245, 36, 25, 77, 51, 34, 32, 255, 255, 1276, 
MEHRABAD INTL, Airbase, 23_05 Airbase 2 Rvr, 24, 1779, 781, 1378, 0, 0, 0, 0, 6, 24, 0, 82944, 0, 0, 0, 27, 40, 0, 6, 3, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 19, 8, 22, 16, 8, 7, 255, 255, 25, 15, 8, 23, 16, 9, 9, 255, 255, 9006, 13, 8, 13, 13, 4, 4, 255, 255, 1212, 
GHALE MORGHI, Airstrip, Highway Strip EW, 25, 1807, 787, 1373, 0, 0, 0, 0, 6, 25, 0, 82944, 0, 0, 0, 4, 40, 1244, 6, 3, 0 0 0 0 0, 19, 8, 22, 16, 8, 7, 255, 255, 24, 16, 9, 19, 16, 7, 7, 255, 255, 1244, 19, 156, 181, 171, 20, 19, 255, 255, 12978, 
SEMNAN, Airbase, 21_03 Airbase, 26, 1778, 978, 1367, 0, 0, 0, 0, 6, 26, 0, 82944, 0, 0, 0, 17, 40, 0, 6, 0, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 
SEMNAN NEW, Airbase, 26_08 Airbase Rvr, 27, 1780, 994, 1346, 0, 0, 0, 0, 6, 27, 0, 82944, 0, 0, 0, 17, 40, 0, 6, 0, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 
SANANDAJ, Airbase, 01_19 Airbase, 28, 1772, 388, 1329, 0, 0, 0, 0, 6, 28, 0, 82944, 0, 0, 0, 15, 40, 0, 6, 0, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 
SHAHROKHI HIGHWAY STRIP, Airbase, 23_05 Airbase 2 Rvr, 29, 1779, 534, 1327, 0, 0, 0, 0, 6, 29, 0, 82944, 0, 0, 0, 27, 40, 0, 6, 0, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 
HAMADAN MIL, Airbase, 23_05 Airbase 2 Rvr, 30, 1779, 538, 1325, 0, 0, 0, 0, 6, 30, 0, 82944, 0, 0, 0, 27, 40, 0, 6, 0, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 
MANZARIYEH, Airbase, 11_29 Airbase, 31, 1775, 732, 1299, 0, 0, 0, 0, 6, 31, 0, 82944, 0, 0, 0, 17, 40, 1453, 6, 1, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 36, 30, 87, 59, 41, 39, 255, 255, 1453, 
HAMADAN, Airbase, 11_29 Airbase, 32, 1775, 526, 1287, 0, 0, 0, 0, 6, 32, 0, 82944, 0, 0, 0, 17, 40, 0, 6, 0, 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0, 
Of course these actual airbases are not the same as they are sorted differently, what I'm just showing is the file formats.

Question is, how could we produce TDF file out of the tacedit up to date CSV file?

Dont tell me manual work as I just wont even go there, some small C utils perhaps (well I have no time to code one), anything else comes to mind? All suggestions are welcome.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

Snake Man
Commander-In-Chief
Posts: 9351
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Post by Snake Man » 2007-03-31 15:12:22

I can safely say that having incorrect TDF file loaded for Terrainview is the most time causing nuisance in ODS development right now, the v0.6 would be out already if the file would be correct :(

So... hmm does any excel guru know if its possible to save CSV file into different format, namely into the TDF format, kind of like configuring a user specified format for the save?
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24 22:01:01
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Post by Sherlock » 2007-03-31 17:03:34

I think it could be done by writing a MACRO for excel to parse the airport csv to the DEM2Terrain TDF file format,

but

a fair amount of research is going to be needed to come up with the steps and sorting criteria to do the parsing. Also, are you going to want to deal with all five (5) levels of airports? I list them here for reference:

Code Definition

1 = Active civil
2 = Active civil and military
3 = Active military
4 = Other
5 = Airport location added from ONC source when not available in the DAFIF

Send me your DEM2Terrain airbase output file (TDF) and your airbase.csv output from TacEdit and I'll research it and see if it really is feasible (or not). email is: lod_viper1 at yahoo dot com.
Sherlock
Victurous te Saluto

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24 22:01:01
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Post by Sherlock » 2007-04-17 03:35:00

hehe...hey Snake Man! With me being out of town when we discussed this (and with everything else that's been happening to me lately) I had forgotten all about doing this for you! Since you didn't say anything about it either I assume you forgot about it also! :)

I'm starting on it now! :)
Sherlock
Victurous te Saluto

Snake Man
Commander-In-Chief
Posts: 9351
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Post by Snake Man » 2007-04-17 06:37:34

But I did send you the example files through email(?), so I decided not to reply here as it would have been stating the obvious. Of course for everyone else it seemed that I ignored you hehe.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24 22:01:01
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Post by Sherlock » 2007-04-17 15:08:37

Snake Man wrote:But I did send you the example files through email(?), so I decided not to reply here as it would have been stating the obvious. Of course for everyone else it seemed that I ignored you hehe.
Yes. I received your files. Working on it...! :)
Sherlock
Victurous te Saluto

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24 22:01:01
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Post by Sherlock » 2007-04-17 16:51:40

Snake Man,
I have a question...

MS Excel is unable to save an output file that has the character "space" between numbers. The only similar output file format it will do is the .csv which, of course, uses commas between the values.

Would you be opposed to a two-step macro process where you do the first step of processing in MS Excel and the second step of processing in MS Word? If so, then this conversion MAY be doable (haven't tried the whole process yet so I don't know for sure yet).

Otherwise, I think we are going to be looking at writing a program to convert the data to the proper format. I'm thinking some kind of Visual Basic for Applications program that could be executed within MS Excel (similar to a macro but more "powerful", i.e., many more options are available).
Sherlock
Victurous te Saluto

Snake Man
Commander-In-Chief
Posts: 9351
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Post by Snake Man » 2007-04-17 17:10:26

If its too much time consuming task, then just forget about it for now and use your time for something more critical.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24 22:01:01
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Post by Sherlock » 2007-04-17 18:53:59

Snake Man wrote:If its too much time consuming task, then just forget about it for now and use your time for something more critical.
Nope. I think I got it figured out. Excel DOES have an output file format that uses spaces (it's the .prn output format). I didn't know that before but found out about it when searching the internet. I just successfully pulled my converted file into TerrainView. I did have to use "4" (or you pick one of the airbase type numbers, 1-5) as the default airbase type since that information is not contained in the .csv file I begin the process with. Here's the key to the colors the different airbase numbers give you:

1-> green
2-> yellow
3-> white
4-> white
5-> white

And here is what I got:

Image
Last edited by Sherlock on 2007-04-17 20:05:25, edited 1 time in total.
Sherlock
Victurous te Saluto

Snake Man
Commander-In-Chief
Posts: 9351
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Post by Snake Man » 2007-04-17 19:06:19

White airbase designation is fine.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

T_Rex
FreeFalcon
Posts: 848
Joined: 2001-03-04 23:01:01
Location: here

Post by T_Rex » 2007-04-17 20:18:13

Guys, if it is a matter of parsing out text, we can also probably program a utility to do it, now that you have the methodology worked out. :)

Even have the user designate the default a/b.

Just an idea.
Sic Semper tyrannosauro.

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24 22:01:01
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Post by Sherlock » 2007-04-17 22:18:41

Snake Man,
check email.

CSV2TDF inbound to your inbox.

Test it out and let me know if you experience any problems.

Detailed instructions supplied in the readme.txt file included in the RAR package.

T_Rex: I actually ended up going with VBA as the way to do it. It was, in the end, much simpler and quicker to "reuse" a text converter VBA code snippet I found on the internet and rewrite it to put the data in the format that Terrainview could read (.tdf). So I didn't go the simple Excel Macro recorder method I was originally thinking of doing.

I'm thinking maybe the VBA code I came up with could be reused in a "REAL" program to convert the .csv file to the new output file? :)
Sherlock
Victurous te Saluto

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24 22:01:01
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Post by Sherlock » 2007-04-18 15:41:37

Bump...

Snake Man, did you get it and try it?
Sherlock
Victurous te Saluto

Snake Man
Commander-In-Chief
Posts: 9351
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Post by Snake Man » 2007-04-18 16:53:06

Yes I got it but did not had chance to try yet.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

Snake Man
Commander-In-Chief
Posts: 9351
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Post by Snake Man » 2007-04-20 03:15:26

It works great, good job! :)

You want me to put that file to downloads?
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24 22:01:01
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Post by Sherlock » 2007-04-20 04:25:08

Snake Man wrote:It works great, good job! :)

You want me to put that file to downloads?
If you want to...

I don't know of anyone else who was asking for something like that but, sure, I guess put it up and it will be there if they need it. :)
Sherlock
Victurous te Saluto

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24 22:01:01
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Post by Sherlock » 2007-04-20 04:37:01

Just so we have a record here at PMC of the VBA code I used (which is embedded as a VBA module in the "airbases.xls" file) here it is in all it's glory:

Code: Select all

 Sub AirbaseConvert()
    Dim Airport, AirportType, AB_Name, Space, CCC, Font, CurrRow, LastRow
    Sheets("Sheet1").Select
    Space = Chr(32)
    Close #1
    Open "Airbases-Output" & Application.Text(Now(), "mmdd") & ".TDF" For Output As #1
    LastRow = Application.CountA(ActiveSheet.Range("A:A"))
    For CurrRow = 3 To LastRow
        AB_Name = Cells(CurrRow, 1)
        Airport = "AIRPORT"
        AirportType = "1"    
        CCC = Cells(CurrRow, 6) & "," & Cells(CurrRow, 7) ' No Pad
        Font = "4"   'This sets all airports equal to type = 4 (white label text in terrainview).
     Print #1, Airport; Space; AirportType; Space; CCC; Space; Font; Space; StrConv(AB_Name, vbProperCase)
     
    Next
    Close #1
    MsgBox "Done ------------------>"
End Sub 
Sherlock
Victurous te Saluto

Snake Man
Commander-In-Chief
Posts: 9351
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC

Post by Snake Man » 2007-04-20 07:43:58

All right CSV2TDF util is now available for download here. Thanks Sherlock, this is very small but very handy util, it saves tremendous amount of time and especially frustration (at least for me) when quality assuring the airbase tiling.

Small tip for any airbase tiling work, open the TDF file in text editor, then start to go through the airbases in terrainview. Each airbase you confirm its okay, remove its line on the TDF file. After you've removed enough of them, save the TDF, then reload the TDF in Terrainview to update the list. Now the airbase dots arent showing the already checked airbases, saving even more time when you go through the dots.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

Who is online

Users browsing this forum: ClaudeBot [Bot] and 0 guests