• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

msfsbglxml - convert MSFS (2020) BGL files to XML

Messages
70
Country
unitedkingdom
UPDATE -- Jan 30 2022: msfsbglxml v1.1 is also now attached below, which includes updates to support changes made in SU6 to certain key attributes. Please note that this release requires the .Net 6.0 Runtime in order to run.

I have left the 1.0 release here for reference as well...

Hi all,

Please find attached msfsbglxml - a command line application which will convert most MSFS (2020) BGL files to XML format.

This application is capable of taking most data found within BGL files and converting it to XML format.

Please run msfsbglxml --help for guidance in running the application. While the application will not affect the source BGL file, I would still recommend copying the BGL file to be examined to a location outside of the MSFS tree.

Important note: This application is licensed for use, not in the public domain, and must only be distributed from fsdeveloper.com.

On first run, and once a month thereafter, you will also be required to acknowledge the application's license terms, shown below for reference. These are in place to protect the community's scenery designers, Microsoft and Asobo Studios, and are deliberately aligned with the EULA terms provided with Microsoft Flight Simulator and the SDK.
  • BGL files are the copyrighted property of the original designer of the scenery.
  • BGL files which are part of Flight Simulator are the copyrighted property of Microsoft and Asobo Studios. Any use of them with this product MUST be in accordance with the Flight Simulator EULA.
  • You MAY use this product to examine compiled scenery for study purposes and for personal use ONLY.
  • You MUST NOT use this product to violate the copyright of scenery designers, or to create & distribute a derivative product based on the work of another scenery designer, without their explicit permission.
Many thanks to Jon Masterson (@scruffyduck) and Pete Dowson for their invaluable help and assistance during the private testing of this application. Thanks also to Winfried Orthmann, Jon Masterson and Patrick Germain for their invaluable past work on the FSX BGL file format. Information on the FS20 BGL file format can also now be found on the FSDeveloper Wiki.
 

Attachments

  • msfsbglxml-1.0.20210217.zip
    243.7 KB · Views: 3,741
  • msfsbglxml-1.1.20220130.zip
    239.1 KB · Views: 3,827
Last edited:
I tried this program, but I lost somethting...I tried my created airport so:
MSFSBglXml.exe sest.bgl sest.xml and so:
msfsbglxml>MSFSBglXml.exe --sest.bgl --sest.xml
but I have the same message:
Unrecognized command or argument 'sest.bgl'
Unrecognized command or argument 'sest.xml'

I tried this:
MSFSBglXml.exe -- sest.bgl -- sest.xml
message:
Error: no --bgl file specified, see --help for help
Where is my mistake?
 
Last edited:
I tried this program, but I lost somethting...I tried my created airport so:
MSFSBglXml.exe sest.bgl sest.xml and so:
msfsbglxml>MSFSBglXml.exe --sest.bgl --sest.xml
but I have the same message:
Unrecognized command or argument 'sest.bgl'
Unrecognized command or argument 'sest.xml'

I tried this:
MSFSBglXml.exe -- sest.bgl -- sest.xml
message:
Error: no --bgl file specified, see --help for help
Where is my mistake?

I would suggest that you look at the help, as the parameter format is different to what you are assuming.

The correct format would be:

msfsbglxml --bgl sest.bgl --xml sest.xml
 
1.13.16 (the UK update) looks like it introduces a number of new BGL elements, so this might break BglLib / msfsbglxml. Currently investigating, but it seems that most of the legacy BGL which are shipped do not have these new elements and so aren't causing any trouble at this point.

There is also an annoying bug with the license acknowledgement. There will be a new build later today which definitely fixes the latter :).
 
Last edited:
Updated build to fix license acknowledgement issues.

It seems that BGLs shipped with new MSFS still mostly behave as expected, with one exception (Barton). Looking into this but it rates as a non-critical issue right now.
 
Hi Matt,

Thanks for building this great tool. Great job! It can be very handy when analyzing a .bgl that is not doing what one expects or if a developer should lose their original source but still has the compiled package (it has happened to me). In testing, one thing I noticed is that the "NoSnow" object option is not discovered. Is there any chance you can add that in in a future version?

Stiletto2
 
When decoding a POI bgl file I get latitudes ranging from -525 to +749 while all POI's are in the UK. This can't be right. The longitudes make sense. Any idea what is going on? The POI's show up correctly in the MSFS2020 World Map.

Djeez2.
 
Trying to decompile UK-POIS-SHAPES.bgl, got error. What i missed?

1622460625860.png
 
well it looks like you are trying to decompile a bgl file full of CVX shapes. This decompiler is for XML based bgl file (Airports & Scenery)
 
Could someone explain simply how to use this program. I have a bgl I would like and try to see what the tool does to the bgl.... I have it installed in its own directory by itself. I have the net3.1 installed.. I run the exe and it doesn't do anything.
Guess I am dangerous but I am 70 and have an excuse..lol..

BobM.
 
Well basically it will generate a xml source from a FS2020 bgl file. It's a command line tool so you would need to run it from the command prompt. There was a GUI version but I am not sure it was published. Perhaps you can tell me what you would do with the XML source?
 
Well basically it will generate a xml source from a FS2020 bgl file. It's a command line tool so you would need to run it from the command prompt. There was a GUI version but I am not sure it was published. Perhaps you can tell me what you would do with the XML source?
I was thinking of converting a fsx bgl to msfs not the other way around... I am trying to figure out all this stuff...lol... Can't get the xml to show up in msfs dev mode and when I load msfs..the KINT airport has got images of airplanes burnt into the texture..looks like shit... so I thought maybe using this tool might get me on the right road.. My new KINT airport looks great in FSX but at a loss for KINT...
Sorry Jon..just frustrated...watch videos..read stuff and still no closer...

BobM.
 
Well you can start a project in ADE from a FSX Bgl file. Quite a lot of stuff like generic buildings, library objects and excludes will not be brought in since they do not work in MSFS. And yes the underlying image will contain stuff that you won't want. This program won't help you at all.
 
The images I believe in the default MSFS KINT has the images of airplanes burnt into the ground or apron textures if that makes sense...if you look at it say from a drone. Don't think It is in my bgl. When i run the list of exclusions in my airport..there are none and none listed in the xml of my KINT.

Thanks Jon.
 
Back
Top