• 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

Does this program still work? All I get are error messages:

msfsbglxml : The term 'msfsbglxml' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ msfsbglxml --bgl klou_adex_zs.bgl --xml klou.xml
+ ~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (msfsbglxml:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

I cannot get the help extension to work either. Obviously I may be using improper syntax but can't figure out what proper syntax is. Any suggestions?
I regularly use this tool without any problems ... in Windows PowerShell

PS D:\MSFS20_SDK\AirportScenery\MSFSbglXML> .\msfsbglxml --bgl K:\APX52340.bgl --xml K:\APX52340.xml
MSFSBglXml v1.0.20210217.085234
Using BglLib v1.0.20210217.085234

*** Use of this product is subject to your continued adherence to ***
*** the license terms previously displayed. ***
*** Run 'msfsbglxml --license' for a reminder. ***

- Processing K:\APX52340.bgl
- Reading BGL file...
- BGL file parsed successfully! Propagating properties...
- Writing out to XML...
- XML written to K:\APX52340.xml
* Success!
 
Ok, got it to work, thanks for listing an example which showed me the proper syntax. Appreciate it!

Jon, looking at KLOU in ADE shows a myriad of GA parking spaces are available, yet MSFS will not populate the airport with any static GA planes. I suppose I can create a scenery file and do so using MSFS developer mode, but shouldn't the sim do that automatically with the number of planes depending on the user settings for AI aircraft?
 
I looked at KLOU and saw all the parking was 5 meter radius. I used ADE MSFS2020 to give me a project and used a text editor to change all those to radius="12.0" Placed the compiled package into the Community folder, and I have parked planes. The radius was too small at 5 meters.
 
Thank you for that information! While my use of ADE is a little rusty, I'll fire it up and try to do the same. I appreciate your figuring out the problem.

Thanks again, Ken
 
Edit the airport XML file with a text editor and recompile, or do it within ADE... but it might take longer to change them individually.
 
Ok, thanks

Edit: Have successfully edited, recompiled and created the new file. Now have parked planes at KLOU, thanks for your help!
 
Last edited:
Hello. I wish I could use msfsbglxml to verify something.
I'm not too familiar with how to use the command line in Windows PowerShell.
Can I be given a step-by-step method to be able to use msfsbglxml ?

Regards,
Marc
 
Ok, got it to work, thanks for listing an example which showed me the proper syntax. Appreciate it!

Jon, looking at KLOU in ADE shows a myriad of GA parking spaces are available, yet MSFS will not populate the airport with any static GA planes. I suppose I can create a scenery file and do so using MSFS developer mode, but shouldn't the sim do that automatically with the number of planes depending on the user settings for AI aircraft?
Could you tell me in a short step by step explanation how to retrieve my .xml from a .bgl file?
 
* D/L the msfsbglxml file from the first page of this topic, if you haven't already done so
* Extract msfsbglxml program to a folder of your choosing
* Copy the bgl file you wish to convert and place it in the same folder as the msfsbglxml program
* Open a cmd prompt: Right click inside the folder, select Open Windows Terminal, type cmd ( if you run PowerShell another way, type cmd and run it. You will need to navigate to the folder with the msfsbglxml progam)
* Use the following syntax .\msfsbglxml(space)--bgl(space).\(yourbglfilename).bgl(space)--xml(space)(desiredxmlfilename).xml (Do not place parentheses around the file names, and place spaces where indicated or you will get an error)
* Run program (hit enter)
* Type Yes to license question and hit enter
* You should have an xml file of your bgl file after program converts it

Try this... hopefully this will work for you
 
* D/L the msfsbglxml file from the first page of this topic, if you haven't already done so
* Extract msfsbglxml program to a folder of your choosing
* Copy the bgl file you wish to convert and place it in the same folder as the msfsbglxml program
* Open a cmd prompt: Right click inside the folder, select Open Windows Terminal, type cmd ( if you run PowerShell another way, type cmd and run it. You will need to navigate to the folder with the msfsbglxml progam)
* Use the following syntax .\msfsbglxml(space)--bgl(space).\(yourbglfilename).bgl(space)--xml(space)(desiredxmlfilename).xml (Do not place parentheses around the file names, and place spaces where indicated or you will get an error)
* Run program (hit enter)
* Type Yes to license question and hit enter
* You should have an xml file of your bgl file after program converts it

Try this... hopefully this will work for you

Hi Ken,

cheers for the detailed steps, but I still get error messages when compiling, no clue why. Maybe you can give it a try? I attached it..
 

Attachments

  • eetn-airport.bgl
    eetn-airport.bgl
    119.2 KB · Views: 335
  • 17.01.2022_22.30.50_REC.png
    17.01.2022_22.30.50_REC.png
    7.8 KB · Views: 386
Here you go... rename the file extension to xml

Cheers, thanks a lot but I need to understand what did not work on my end!

The bgl file is in the same folder as the MSFSbglxml program. I used PowerShells path and then the syntax (see previous attached)!

Thanks again!
 
You appear to have run the program from the PowerShell command line; you must open PowerShell, then type cmd and press enter. Navigate to your folder, then try again. This has something to do with running the program as administrator, something you're not doing if you just open a PowerShell command line apparently.

Someone else can probably explain this a bit better, but for now just give it a go and see if that works for you.
 
Hi Carmelo,

it can't if you don't put the syntax ". \" before the msfs bglxml command


PS D:\MSFS20_SDK\AirportScenery\MSFSbglXML> .\msfsbglxml --bgl K:\APX52340.bgl --xml K:\APX52340.xml
MSFSBglXml v1.0.20210217.085234
Using BglLib v1.0.20210217.085234

*** Use of this product is subject to your continued adherence to ***
*** the license terms previously displayed. ***
*** Run 'msfsbglxml --license' for a reminder. ***

- Processing K:\APX52340.bgl
- Reading BGL file...
- BGL file parsed successfully! Propagating properties...
- Writing out to XML...
- XML written to K:\APX52340.xml
* Success!
 
You appear to have run the program from the PowerShell command line; you must open PowerShell, then type cmd and press enter. Navigate to your folder, then try again. This has something to do with running the program as administrator, something you're not doing if you just open a PowerShell command line apparently.

Someone else can probably explain this a bit better, but for now just give it a go and see if that works for you.
I found time to try the converted xml but I get error messages in ADE or the SDK, can you try it on your end please if it works?
 
Hi,
I was at the end of a long scenery development when MSFS crached and lost the content of the poly.xml file. Files (.xml .shp .shx .dbf) are there but empty in my dev folder. I'm trying to use this tool but can't make it run in the CMD. I'm clearly a beginner in the command tool.

This is the line I put but CMD answered me that this is not a recognised command or program. The path to the folder is right. I installed Runtime.
C:\Users\guill>\BGLdecomp\MSFSbglXML> .\msfsbglxml --bgl K:\poly.bgl --xml K:\poly.xml

When I remove the slash before BGLdecomp folder name, it does nothing (no answer).
C:\Users\guill>BGLdecomp\MSFSbglXML> .\msfsbglxml --bgl K:\poly.bgl --xml K:\poly.xml

Any Idea?
Thanks very much in advance.
 

Attachments

I used the latest version of CVXExtractor to extract the poly.bgl as a KML file, then used QGis to save as a shapefile. It works, but you'll loose your DBF definitions... Its about as far as I could go with it.
 

Attachments

I found time to try the converted xml but I get error messages in ADE or the SDK, can you try it on your end please if it works?

I attached it. It occurs when I 'Create a project from xml' :/
 

Attachments

  • error.jpg
    error.jpg
    11.5 KB · Views: 302
Back
Top