Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Why do so many default scenery bgls have 'errors'?

Featured Replies

Hi. Can anyone say why, when I disassemble (with BGLAnalyze fro FS9) many of the default scenery files (e.g. AP******.bgl) to an xml file and then try to recompile the file (even immediately, unaltered) with BGLComp.exe I do not get any bgl file created - the cmd window that flashes up shows errors which prevent a new bgl file from being created.Is there any way around this? I have a number of files I'd like to edit (airport names, navaid data etc. - elevations I know I can do with other tools).Thanks!Martin

Martin Stebbing, EGLF (UK)

Martin,These problems occur because the decompiling tools have bugs and shortcomings.NewBGLAnalyze, for example, can not properly decompile some elements in ATIS/AWOS/ASOS radio frequencies. Attempts to recompile the files will result in error messages. There are similar faults in handling of certain instrument approach legs, taxiway signs, and VASI/PAPI arrangements.You will probably find it easier to do much of what you want with a program like ADE9X. Editing a BGL file directly is a high-risk endeavor, as you have discovered.Todd

  • Author

Hi. Thanks for the reply. I sort of figured the errors were in the decompiler/recompiler rather than the original files. Yes, I'd be better using ADE9, you are quite right. I have it on the PC but rarely think to use it - must retrain myself! My first reaction is always to dive for BGLAnalyze - force of habit! That said, I am not sure how to replace the FS9 default bgl file using ADE9x - for instance, if I want to update the name of an airport. An example is OPRN - for which I have 3rd. aprty addon scenery. I have already changed the name of the addon AFCAD (to Benazir Bhutto Intl) using AFCAD2. But the default AP.bgl file for this airport still shows the old name, and that old name is what appears in the FS9 'Create a Flight' list for OPRN. My instinct was to use BGLAnalyze to rename the airport in the default file - but as I say, I get errors. Using ADE9x creates an .ade format file, which I can compile to a bgl - but that will only be another version of an AFCAD for the airport, no? How do I use ADE9x to replace/edit the default AP******.bgl file itself? I can't see this from the manuals. Thanks again for any further help.Martin :-)

Martin Stebbing, EGLF (UK)

  • Author

.. I am assuming ADE9x cannot edit the default bgl file. Please, someone, correct me if I am wrong! Are there any other tools to edit an AP******.bgl file without getting the compilation errors of BGLAnalyze?

Martin Stebbing, EGLF (UK)

Hi Martin:It is generally regarded as best to use ADE9X (or AFX) to edit a COPY of the airport and leave the default AP*.BGL file untouched. :( Both of these programs can create / import / edit airport BGLs in either FS9 or FSX; ADE9X is freeware, AFX is payware, and both work well. :( The edited copy of the airport can be as small as an ARP change, or as comprehensively large as an entire airport replacement... if desired.The replacement BGL simply needs to be located "above" the default AP*.BGL file (in the upper layers of the Scenery Library user interface).In some cases there is a need to place an additional "stub" airport file for either an ARP or RWY elevation change that needs to be read BEFORE the default AP*.BGL file by placing it in [FS install path]\Scenery\World\Scenery; I believe ADE9X can now do this latter file folder placement automatically.PS: for more info on this and other features / explanations / procedures that might not yet be in the ADE9X manual, see:http://www.fsdeveloper.com/forum/forumdisplay.php?f=95Hope this helps ! :( GaryGB

  • Author

Thanks for that Gary. But what I don't understand then is why, although the AFCAD in the addon scenery has the correct airport name for OPRN (Benazir Bhutto Intl), FS9 (e.g. in the Create a Flight window), still shows only the old name (Chaklala Intl). The addon has a much higher priority than the default AP bgl file. Is there something else I need to change?Martin

Martin Stebbing, EGLF (UK)

I think you can fake it out with ADEX. open the stock airport and change the name as desired (ICAO must remain the same). Then, use the change airport elevation tool to change the elevation, then change the elevation back to the original. Compile and ADEX will create the "stub" airport thinking you are changing the elevation (you're not, though) but a side effect is that you should be able to see the airport name you want in the menus.You still should add the full ADEX file. Don't forget you may need to use editvoicepack to get the new name used by ATC.scott s..

Thanks for that Gary. But what I don't understand then is why, although the AFCAD in the addon scenery has the correct airport name for OPRN (Benazir Bhutto Intl)
Because the basic airport information is obtained from the first AFD file read (usually the default APX). Only certain modifications are read from later loaded files.
  • Author

.. which means that the only way to get fully up to date info in FS9 is to edit the default AP bgl file (which I have done successfully on several occasions). If the file shows errors when trying to recompile, sounds as if that, as they say, is that (short of trying to correct the rrors, but that would take me a bit more research, as I don't really understand what the errors are and how they need to be corrected..Oh well, I can live with it! M. :-)

Martin Stebbing, EGLF (UK)

.. which means that the only way to get fully up to date info in FS9 is to edit the default AP bgl file (which I have done successfully on several occasions). If the file shows errors when trying to recompile, sounds as if that, as they say, is that (short of trying to correct the rrors, but that would take me a bit more research, as I don't really understand what the errors are and how they need to be corrected..Oh well, I can live with it! M. :-)
Hi Martin:If you are determined to edit your own copy of the default AP*.BGL and recompile it (being careful to not release it off your own system to others), be aware that there are some additional edits that must be put into the FS2004 SDK BGLCOMP.XSD file (which is required to make BGLCOMP.EXE fully functional) in order to eliminate possible reasons why the XML airport file won't re-compile. :( Alessandro Antonini, author of BGLXML 1.80 decompiler for FS2004 files has a tutorial on doing this edit to allow more successful FS9 re-compilations:http://library.avsim.net/esearch.php?CatID...&DLID=75329"IMPORTANT: CHANGES to BGLCOMP.XSD !!!Please note that the original BGLCOMP.XSD (the schema file) supplied by Microsoft along with BGLCOMP archive is incomplete and has typos. Therefore you have to apply some changes before allowing recompilation of decompiled files."But it would really be best, IMHO, to use the FS9 mode of ADE9X to edit a copy of the airport, and then compile that copied airport for output in FS2004 BGL format.I believe this is more an issue of being sure that the ADE9X BGL "ARP" file gets read before the default FS2004 airport file does... just a folder and layer issue.Be aware that the layer priority for [FS install path]\Scenery\World\Scenery will result in it being read BEFORE the location of FS9 default airport files, and certainly before [FS install path]\Addon Scenery\Scenery.IIRC, in FS9 there was only 1 rare situation (I can't recall which reason that was used for) in which one needed to put yet another airport stub file into [FS install path]\Addon Scenery\Scenery in addition to the one we are discussing which should be put into [FS install path]\Scenery\World\Scenery.Normally one should always first put a "stub" airport file into [FS install path]\Scenery\World\Scenery to implement certain airport changes in either FS9 or FSX... NOT the Addon Scenery folder.I think Joe Watson recently fixed a somewhat different scenario with an ARP file placement in a thread at FSDeveloper that might be worth browsing:http://www.fsdeveloper.com/forum/showthread.php?t=17686Hope this helps ! :( GaryGB
  • Author

Hi again. Thanks once more for the input - I'll save this page to my PC and look at it in more detail over the next day or two. I'll have another go with the priorities, but all my 3rd. party scenery has higher priority than either the 'FS9/addon' folder, or the main FS9/scenery folder, so I am not sure why the bgl stubs from ADE9x are ignored in favour of the default bgls. I'll experiment a bit over the next few days, as I say,Martin

Martin Stebbing, EGLF (UK)

Hi again. Thanks once more for the input - I'll save this page to my PC and look at it in more detail over the next day or two. I'll have another go with the priorities, but all my 3rd. party scenery has higher priority than either the 'FS9/addon' folder, or the main FS9/scenery folder, so I am not sure why the bgl stubs from ADE9x are ignored in favour of the default bgls. I'll experiment a bit over the next few days, as I say,Martin
The problems with trying to decompile and recompile a default file is that (as mentioned above) no community created decompiler can be sure of getting everything right. The format of bgl files is proprietary so any 'reverse engineering' has been done by the community using trial and error. Whilst this works in most cases for a single airport it is a risky business to decompile a whole AP file that may have dozens of airports in it without the law of unintended consequences rearing its ugly head. The decompiler used in ADE is quite good though not perfect. In ADE it will only decompile a single airport at a time. You could try Bgl2Xml GUI - this is the decompiler from ADE but used to generate XML from any file and so will generate the XML from an AP file in total.

Jon

-------

Microsoft Flight Sim MVP

Airport Design Editor FSDeveloper.com

  • Author

Thanks - I appreciate the logic of what you say. I always, of course, keep a copy of the default bgl files, in case of unexpected problems with my edited version, though usually, when I am able to recompile, things are fine. Martin

Martin Stebbing, EGLF (UK)

I think you can fake it out with ADEX. open the stock airport and change the name as desired (ICAO must remain the same). Then, use the change airport elevation tool to change the elevation, then change the elevation back to the original. Compile and ADEX will create the "stub" airport thinking you are changing the elevation (you're not, though) but a side effect is that you should be able to see the airport name you want in the menus.You still should add the full ADEX file. Don't forget you may need to use editvoicepack to get the new name used by ATC.scott s..
Is it possible to change the ICAO name of an airport without editing the default .bgl?I tried to do this without editing the default file and failed. An FS9 default airport (Hatfield EGTH) had been closed in real life and its ICAO code assigned to another one (Old Warden) not in FS9.

Gerry Howard

Is it possible to change the ICAO name of an airport without editing the default .bgl?I tried to do this without editing the default file and failed. An FS9 default airport (Hatfield EGTH) had been closed in real life and its ICAO code assigned to another one (Old Warden) not in FS9.
No you cannot change the ICAO code unless you edit or remove the AP bgl. The airports in FS are protected since MS owns them. We are allowed to enhance one of their airports but not give it a new ICAO code without duplicating. You can delete the entire airport with ADE9X for the exception of the Airport reference point which has the ICAO code embedded.You can delete the entire airport and rebuild using a new ICAO code. If the user selects the old ICAO code from the Go To menu the airport will be missing (LC will still exist). The new ICAO code will show what you added back as a airport.MS also built in a fail safe if someone try's to delete or move their airport. We call the fail safe a fall back/snap back scheme that if the airport is moved too far FS does not honor the move and falls back on the original position read from the APnnnnn. bgl file. The fall back is also used in many parts of the Navaids (other bgl's) since they affect route planning (Victor /Jet Airways) in the flight plan editor. There are coded parts in the stock APnnnnn.bgl that are always read at that bgl regardless of what we set at a higher priority. In some cases a preload bgl will work but not for the ICAO code. MS has posted in various forums that editing a default Airport bgl is a no-no.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.