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

Editing AFCAD2 file and recompile...

Messages
875
Country
us-ohio
I need to dissasemble an afcad2 file. Then, I need to modify it by adding some xml data to it, and then recompile. I have NOT been able to get it to compile at all.

I have even tried just decompiling, and then recompiling. Still will NOT compile.

What is needed to make this file compile properly? I have all the compile and decompile programs that I can find.

Here is why I am trying to do this, and maybe someone has a better idea:

I have my airports AFCAD2 file. I use the taxi sign creator program to make all my taxiway signs. This creates a bgl file of its own. The problem is, that FS9 as well as every other program that can, sees this as another AFCAD2 file. Thus, the airport looks like it has multiple afcads. Now, you can ignore this a bit, but in FSNavigator, it registers 2 seperate airports with seperate airport centers, data, etc... This is annoying and a potential problem.

What I want to do, is take my xml data for the taxiway signs and put them into the normal AFCAD2 file. So, can this be done?

On the same note, when I mouse over airports in FSNav, it will show all the airport data. All the radio frequencies used, etc... When I mouse over mine, it shows just the basic data. Even though I have all the data entered into AFCAD, it doesn't show up outside. Anyone have any thoughts on this?

Thanks in advance for any and all help. I am finding all sorts of great tips and help on this site.

- Greg
 

Horst18519

Moderator
Resource contributor
Messages
2,370
Country
germany
SpectroPro said:
What I want to do, is take my xml data for the taxiway signs and put them into the normal AFCAD2 file. So, can this be done?
Yes, it can be done. We discussed that in another thread recently. But the problem is, if you want to share your airport it's no good to manipulate default FS-files. So you'd better use a second afcad-file. But when you say that you see both in FS/FSNav, that should mean that both have the same priority. S I think both AFCADs are made by you, aren't they? Then it would definetly be better to put both in one. It should work fine with decompiling. What tool do you use? The MS-SDK?
 
Messages
875
Country
us-ohio
Sorry if I missed that thread. I have been reading all I can here to find the answers, and apparently missed that one. :banghead:

I don't ever edit default files. I always use backups or self made. Yes, the two files are both made by me. I made the AFCAD file with all corrected and updated airport info. I also made the taxi sign file (with CreatSign.exe).

As far as software, I have everything I could find. I have tried to disassemble both files with everything I have.

BGL Analyzer, BGL Analyzer (NEW), bglxml.

When I do the taxi sign file, I get a file with nothing in it except the top info. NO taxi sign info at all. when I do the AFCAD file, I can do it, but I get this odd error about the ILS not being found. (NOTE: I can do another AFCAD and it works with no errors...so no clue why mine has that ils error.) But, no matter which AFCAD I manage to get into xml format, BGLcomp will not compile it.

So, if you can tell me what I need to do to correctly convert my afcad into xml, then add the taxi sign info, and then compile, I would be ever grateful.

I have the raw xml taxi sign data from before it was compiled. Odd that it compiles fine with bglcomp, but will not decompile.

Thanks again,

- Greg
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi Greg,

SpectroPro said:
When I do the taxi sign file, I get a file with nothing in it except the top info. NO taxi sign info at all.

I have the raw xml taxi sign data from before it was compiled. Odd that it compiles fine with bglcomp, but will not decompile.

I have seen this problem as well, when trying to extract sign data. I think newBGLAnalyzer does a better job in this area then BGLXML, but both are not really perfect. In the end I made my own tool to extract the hex data from the BGL. This is something I did at work, so I don't have access to the tool at home.

Another point, I don't think TaxiSign commands need to be in the Airport tag of the XML file. Therefore your sign BGL should never create a second airport entry. Or did they just place it airport tag there to get a proper exclude?
 
Messages
875
Country
us-ohio
That's a good question. But, if it doesn't have to be in the airport tag, can it then be put into a file OTHER than the AFCAD file? And, if it doesn't have to use the airport tag, then what would it use? Maybe I can just 'change' the airport tag in the normal taxi sign xml and see what happens.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
SpectroPro said:
But, if it doesn't have to be in the airport tag, can it then be put into a file OTHER than the AFCAD file?

Yes. Although the word AFCAD file is maybe a bit wrong here. Both files are valid Fs2004 XML style BGL files. The only difference is that there is no Airport command used in one of them (just like a file placing only 3D objects does not need an Airport command).

So I think it should work if you just put the TaxiSign commands in an XML file (with the XML header and FsData command) and then compile a new BGL. That should give you signs and only one entry for the airport.
 
Messages
875
Country
us-ohio
Well, that didn't work. Something is apparently missing and I simply don't know what it is. Tons of errors.

I will upload the original un edited xml file for you. Maybe you can make it compile with out the airport info.


- Greg
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi Greg,

Humm, my fault. This is weird it seems you can not compile it outside the Airport tag, but when looking at the hex format of the default BGL files they are stored outside of the Aiport command. That is what made me thought that it should be possible.

I guess then the best approach is indeed to merge the two airports. What kind of errors do you get when you try to compile your decompiled AFCAD?
 
Messages
875
Country
us-ohio
Just a small section of the errors while trying to compile kcvg's afcad file. I decompiled it with NO problems at all. Please note: the following are errors from a freshly decompiled afcad file. NO mods have been made to it at all.

ERROR: 4174, 21, minInclusive constraint failed.
The attribute: 'heading' has an invalid value according to its data type.
ERROR C2033: XML Parse Error (line, column, error)

ERROR: 4185, 21, minInclusive constraint failed.
The attribute: 'heading' has an invalid value according to its data type.
ERROR C2033: XML Parse Error (line, column, error)

ERROR: 4196, 21, minInclusive constraint failed.
The attribute: 'heading' has an invalid value according to its data type.
ERROR C2033: XML Parse Error (line, column, error)

ERROR: 4207, 21, minInclusive constraint failed.
The attribute: 'heading' has an invalid value according to its data type.
ERROR C2033: XML Parse Error (line, column, error)

ERROR: 4218, 21, minInclusive constraint failed.
The attribute: 'heading' has an invalid value according to its data type.
ERROR C2033: XML Parse Error (line, column, error)

ERROR: 4229, 21, minInclusive constraint failed.
The attribute: 'heading' has an invalid value according to its data type.
ERROR C2033: XML Parse Error (line, column, error)

ERROR: 4240, 21, minInclusive constraint failed.
The attribute: 'heading' has an invalid value according to its data type.
ERROR C2033: XML Parse Error (line, column, error)

ERROR: 4272, 21, minInclusive constraint failed.
The attribute: 'heading' has an invalid value according to its data type.
ERROR C2033: XML Parse Error (line, column, error)

ERROR: 4283, 21, minInclusive constraint failed.
The attribute: 'heading' has an invalid value according to its data type.
ERROR C2033: XML Parse Error (line, column, error)

ERROR: 4316, 21, minInclusive constraint failed.
The attribute: 'heading' has an invalid value according to its data type.
ERROR C2033: XML Parse Error (line, column, error)

ERROR: 4327, 21, minInclusive constraint failed.
The attribute: 'heading' has an invalid value according to its data type.
ERROR C2033: XML Parse Error (line, column, error)

ERROR: 4359, 21, minInclusive constraint failed.
The attribute: 'heading' has an invalid value according to its data type.
ERROR C2033: XML Parse Error (line, column, error)

ERROR: 4381, 21, minInclusive constraint failed.
The attribute: 'heading' has an invalid value according to its data type.
ERROR C2033: XML Parse Error (line, column, error)

ERROR: 4392, 21, minInclusive constraint failed.
The attribute: 'heading' has an invalid value according to its data type.

ERROR: Schema errors detected, compilation failed!

Parse complete!

ERROR C2002: Failed to find files: (af2_kcvg.bgl)

---

I would upload the cvg afcad.xml file for you, but you could just as easily decompile one of your own, and then try to recompile it. I tried to recompile using bglcomp.exe (newest version)

- Greg
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi Greg,

I tried two AFCAD files here (both rather complex) and no problems at all. I used newBGLAnalyzer to decompile them. So it might also be something specific in your AFCAD file.
 
Messages
875
Country
us-ohio
Arno,
I used the same to decompile mine. Then, you used bglcomp.exe to recompile, correct?

Did you use any special commands, or basic command line:

bglcomp AF2_KCVG.xml AF2_KCVG.bgl


I get the same error if I do it via dos shell or drag and drop.

Appreciate any help here... no clue why mine isn't working.

- Greg
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi Greg,

Yes, just used BGLComp to compile it again (lastest version available from MS). Just by typing at the command prompt:

bglcomp myfile.xml

Can you maybe show me your XML or BGL file? Then we could see if it is something specific in that file.
 
Messages
55
Greg,
I've compiled your nkl_taxi.xml and tested the .bgl in fs9. There seems to be nothing wrong with it. I get lots of taxiwaysigns in sight.

Now back to your first problem: "why does fs9 see my taxiwaysign.bgl as another airport_afcad2 file?"
I think it's because you placed it in the same folder where you put your addon-afcad.file (fs9\addon scenery\scenery).
When you place your taxiwaysign.bgl in the folder:fs9\scenery\generic\scenery then fs9 will read and show the data from it, but it will not recognize it as an afcad.bgl.

Hope this helps.

Bert
 
Messages
875
Country
us-ohio
Uploading my 2 bgl's I have been trying. kcvg and nkl. I made the nkl, the cvg came from pai actually. But, as stated, I can't get either to compile once I de-compile.


As for the placement of the files, I currently have a folder structure as below:

addon scenery
\
United States
\
Florida
\
KNKL - Navarre
\
Scenery

In THAT scenery folder is where all my files for that airport reside. The AFCAD created file, the taxi sign file, all scenery bgls, etc...

(yea, I am anal about my folder organization...hehe everything goes in it's own area by country, state, etc....)

Please find my included files. By the way, bruin (and thank you for all the work you did on this) I don't have a problem with that taxi sign file. That is the ONLY one I can compile with no problems. THAT's my problem...

- Greg
 
Last edited:
Messages
55
Greg,
I decompiled your af2_NKL.bgl with newbglanalyze and saw what the problem is.

There appear to be some differences between the compiler, build in afcad221.exe and the bglcomp.compiler.

In your case, afcad221.exe has placed the type "ASOS" in three of your VASI-end statements. (search for "ASOS" in the xml-file and you will find them.)

According to the fs2004bglcompsdk, "ASOS" is not a correct type for VASI.

If you change those three types into valid types for VASI-end, or delete the three VASI-end-statements completely (type "none" is invalid too), bglcomp should compile your xml.

It worked for me. Let us know if it worked for you too.

Good luck

(Maybe tonight I will look at the other file and see what the problem is in that one).

Bert
 
Messages
55
Greg,

I decompiled "your" af2_kcvg as well.
The problem in that xml is that for some reason in several taxiwayparking-statements are negative headings:
for example the second one in the list is:
<TaxiwayParking index="1"
type="GATE_HEAVY"
name="GATE"
number="7"
lat="N39 3.27727"
lon="W084 39.19632"
heading="-89.72"
radius="54.0M"
pushBack="BOTH"/>

If you change all the negative heading-values in your taxiwayparking-statements to positive-ones, recompiling should work.

General warning:
Once you have managed to succesfully compile an xml with bglcomp, never open and save that bgl in afcad.exe. Otherwise you could get the same problems as you have experienced.

Bert
 
Messages
875
Country
us-ohio
THanks for the info. Odd on the KCVG file as that comes directly from PAI. I wonder if all the PAI files are like that? I wonder if PAI is aware of the problem?

I am going to ask a friend of mine (if I can find him) to write me a little script that I can run the raw xml files through that will find the errors and correct them. He has done things like this for me before. He made a nice script for me that takes the airport location file (airport.txt) and converts it to the format used by FSHost. Took him about 5 minutes to do it. And using it, I was able to add 15000 airports to my FSHost airport list.

If he does this for me, I'll make it public.
 
Messages
875
Country
us-ohio
Actually, I forgot that I had edited that PAI file. The KCVG one. So their version may have been fine when I got it.

I wish 'someone' would update AFCAD. It's a bummer to read all the 'coming soon' features he listed only to know that apparently, it will never happen. He seems to have updated often for a while, then nothing now in years. Too bad, great app.
 
Messages
875
Country
us-ohio
Now here is something interesting.

When you take an airport AFCAD and decompile it using NewBGLAnalyze, it totally screws up the file. It removes all sorts of data. I tested this one 10 airports and all 10 had the same affect.

First, it removes all reference to fuel availability. While not anything major, the fact is, it screws it up. It also changes if you have PAPI4 set to PAPI2. Why it would do this, I have NO clue.

If you use bglxml.exe, that problem doesn't occur.

Using both programs, I can't seem to find any ILS data located anywhere in the files.

***EDIT*** I made a correction to my ILS of MY file and I see the data now. However, I can't find it in the stock airport files... This is still odd. Just trying to understand all this as I want to learn all I can about making scenery and airports.

Can someone tell me WHERE in the file(s) I would find this? Or, if it isn't there, where is it? I have noticed that if you recompile one of these files (from either program) the ils systems are gone. Which seems to tell me they are being stripped from the files upon decompile. Now this would be quite stupid I think... If this is the actual case, then can someone please lead me to where I find out HOW to put the information back in the files manually? I would be most appreciative.
 
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,883
Country
netherlands
Hi Greg,

SpectroPro said:
First, it removes all reference to fuel availability. While not anything major, the fact is, it screws it up. It also changes if you have PAPI4 set to PAPI2. Why it would do this, I have NO clue.

Both these compilers are not official decompilers of course. They are build with the knowledge their designers had at the time of creating them. So there will certainly be parts of the XML BGL format that were not known then (or are still not known) and are therefore not decompiled correctly.

I have seen this happening with Taxisigns (different results with both decompilers) and it is very likely that the problem you see are due to the same reason.

SpectroPro said:
Can someone tell me WHERE in the file(s) I would find this? Or, if it isn't there, where is it?

I would expect it to be in the default airport BGL files. But if the files you are decompiling are AFCAD files (so addons) it could be that you need to look in the BGL file of the default scenery. If the ILS is not changed it is very likely it does not end up in the new AF2*.BGL file.
 
Top