• 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.

FS2004 Querying BGL

Messages
1,043
Country
us-northcarolina
It seems programs like DOF (Duplicate Object Finder) read objects ID directly from the BGL.

Is this done with homemade code, a DLL, a wrapper class, an offset to read, some program I missed from the SDK, else?
 
It seems programs like DOF (Duplicate Object Finder) read objects ID directly from the BGL.

Is this done with homemade code, a DLL, a wrapper class, an offset to read, some program I missed from the SDK, else?

Since that is my program I will answer.

MS does not provide any official way to decompile the bgl format. This is because it is proprietary and copy right the original developer. I have asked that perhaps they would provide an official decompiler for Flight - whatever the format for the files in there might be I have no idea however.

So all code to unpack the contents of a Bgl file is community made. Several people have done work on unpacking the format of the files. Winfried Orthman is probably the most important in this area. His analysis of the file structure is publicly available on the Wiki. Many of us have extended that knowledge and a number of people have written decompilers. Mine is used in all my programs. If you want to look at the structure of a Bgl file then you might try my SDE Test App. This displays a file in a number of formats including the way it looks in hex etc.

My decompiler is in a dll file written in C# and based on the information gathered by the community over the years and my own findings. If you need to read a bgl file then you have a couple of choices:

Use an existing decompiler to generate source XML and then process it - there is a command line version of Bgl2Xml that can be called as a process and return xml. Ther are other command line decompilers but I am not aware of any being as up to date as ours.

Write your own decompiler based on the file format information that is published. Depending on what you want out of the file this could take a few hours up to a few months ;)
 
Thank you Jon for your explanations. You confirmed what I originally thought.
A while back I created a decompiler for AFCAD files so I'll just modify the code a bit to adapt it to scenery objects.
 
Unfortunately I won't be able to use SDE. Apparently it requires SimConnect and spits a big error message as soon as I launch the app.
 
Last edited:
Back
Top