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

FSXA xml question

Messages
2,388
Country
us-washington
I have a bgl. I disassemble it with Newbglanalyze to an xml.

bingo... done. Now- I want to take that xml and enter a lat and lon so I can place this bgl at that location.

This xml does not have lat and lon in it. Can I modify this xml so I can enter lat and lon and recompile to a bgl and place it? Bob
 
Last edited:
If it does not have coordinates in it then what sort of Bgl file are you decompiling? Sounds like you are extracting a mdl file from a library? Any Bgl file containing placements will have coordinate properties in it
 
Jon- thanx for the reply. This a zip file which has anexe file in it inside of which is texture and the bgl for a B58 The bgl has an mdl in it when I dissassembled it. No lat or lon.

This is a freeware file sent to me by my friend for placement. I am sure you are familiar with this. This is the fellow who makes statics incredibly large and tells you to rescale down to.xxx for proper size.

He does very nice work, but it does need scaling which I did. All went well for a couple of months..... no problem. Suddenly a few days ago my friend and I noticed that at certain angles and/or distances the top half of the plane disappears.
This causes me to think that something I placed recently might somehow be interfering with this plane.
I use IS2 for placement. No other object I place has had this problem except one... a fire extinguisher with the same problem.
We replaced it with a different one which solved the problem.

so- As experimentation I wanted to get the xml from the B58 bgl and enter lat and lon at some other airport and go watch it now and then to see if the problem follows. But I see I can't do so because the xml does not have any entry for lat and lon.

I have used such bgl's and xml's for placing beacon towers and also a trigger for fuel (yes I know there are other ways especially in ADE which is great, but I have fun now and then doing it this way.)

So- 1. how do I get or find or make a xml with lat and lon to modify?
2. Why does this happen - half the plane missing sometimes? ( top down view the plane is stable!!!!) exclude poly with library items checked?

3. While I am here? Possible causes for my friend's traffic plan (which works elsewhere) has problems at a certain airport we are working on to help a friend: ai turn to final, comes in nicely, lands, disappears! I've checked fault finder- connections seem ok. I thought that in AFX and ADE there was some way to light up all good connections from rwy to parking spots to show good connections or breaks. If this is so I have forgotten how to do that in either program.

A lot to ask, I know, but any help would be appreciated. Bob
 
If it contains an mdl file then you need to use xml code first to compile the mdl into a bgl file and then use the placement code for a library object that refers to the GUID for the mdl file once compiled and the location to place it

ADE will do this automatically if you import the model to a project but you can obviously write your own XML to:
  • Add the mdl file
  • Place it
 
did that... got the mdl, chose model- placed it. bingo it's there. Right click on the yellow box- view xml - I see it. Where do i go to get that paticular xml that pertains to that model?

What I tried doing was to go to a stock airport, make this an active scenery and use ade to use that new scenry and place this single model. Compile with save xml option.

Then I opened this xml and deleted anything not pertinant to the model. i now had and xml for the model with a lat and lon.

Went to another location and got the lat and lon where my plane sat, then entered these coordinates into the xml.

Then tried to compile the xml to a bgl. did not work. Comp[ile helper says not of a known bgl type.

Either this will not work or I did something wrong in the xml where bglcomp does not recognize it.

Just trying to find out how to do this just for fun and able to do it if ever needed.

This is sort of along the lines of Opa Marshall's rotating beacon utility a few years ago. I thought I could make something like that - instead of a rotating beacon, I would use a model of my choice. Bob
 
is there anyone who can tell me why this xml should not compile into a bgl?Thanx. This is not an ai even thought file name says. Bob
 

Attachments

It compiled for me once I made a phoney B58 Hustler AI.MDL.

Are you absolutely sure there exists a B58 Hustler AI.MDL in C:\MDL FILES FSX\scenery mdls?

Jim
 
Jim- Yes there is. this is where I keep my mlds for Instant scenery2 and ADE.

what I have been trying to do is relearn- (did a few years ago) how to do this. I just wanted an alternative method of placing single bgls if for some reason I can't or don't want to do it with IS2 or ADE.

Basically that was with Opa Marshall's rotating beacon utility. I did this also with a fuel trigger. As I said previously I just wanted to be able to do it- just for giggles and learning.

I took this B58 bgl to newbglanalyze to decompile and got my xml. took this to where I keep the rptating beacon utility work folder, entered the lat and lon and heading of my previous flight ad compiled. Nothing happens.

so perhaps the compiler (where a copy of my bglcomp and bglcompxsd- whatever it is) is can't the the mdl even though the mdl is in the right place on my machine? Bob
 
I do it with an XML script all the time, nuthin wrong with that.

Maybe try moving the XML and the .mdl into the same folder you have bglcomp.exe and bglcomp.xsd, then edit the XML so it just says sourceFile="B58 Hustler AI.MDL" and drop it on bglcomp and see what happens?

Jim
 
With ADE you do not need to have mdl files in a Bgl file. You can add models in ADE and then place them
 
Jon- This is true, and a good tool to have. I'm just trying to find out why I can't modify my xml with lat and lon and compile to a bgl for the reasons I spoke of above. Bob
 
Well- I tried making a copy and put it in C drive directly and changing the path in the xml. No go. also tried the bglcomp in my sdk just in case. - no-go. I'm doing something wrong here! sheesh! :( Bob
 
I can't get it to not compile Bob. First I removed the path from the XML and put the .mdl in the same folder as the XML, worked fine. Then I made a "C:\MDL FILES FSX\scenery mdls" folder and put the .mdl in there, still worked. No matter what I did it still worked.

I attached the .bgl, lol. I'm sure that's not the end result you wanted out of this, but here it is anyway :)

Jim
 

Attachments

I expect it to compile on the same page as the xml. Is it perhpas compiling somewhere else and I don't know it? Bob
 
Yes, it should put the .bgl into the same folder the XML is in.

Put a copy of bglcomp.exe and bglcomp.xsd into a folder somewhere, then put a copy of the .mdl and the XML in there along with it. Change the XML so it reads sourceFile="B58 Hustler AI.MDL" instead of sourceFile="C:\MDL FILES FSX\scenery mdls\B58 Hustler AI.MDL". Then right click the folder while holding the shift key down (assuming Win7) and select "open a command window here". In the command window, right click and paste the line below, then press enter.

bglcomp "B58 Hustler AI.xml"

That'll keep the command window open once it finishes compiling (or fails to compile) so you can read what went wrong. If it compiles correctly you'll see "Parse complete!" and you should end up with a .bgl in the folder along with everything else.

Jim
 
the "folder" I assume means work folder in this case. This is where I have bglcomp, bglxsd, the mdl, and the xml. I have the mdl inside the"" and without the *.... correct? jgp attached.
 

Attachments

  • screenshot136.jpg
    screenshot136.jpg
    201.7 KB · Views: 420
Where are you getting the * Bob? Yep, as George said you don't have a "B58 Hustler AI.xml", you have a "B58 Hustler AI.bgl.xml" which I assume is the output from Bgl2XML when you decompiled something?

Open up the bglcomp "B58 Hustler AI.txt" and remove the path so all it says is sourceFile="B58 Hustler AI.MDL", then rename it "B58 Hustler AI.xml" and try the command again.

(...or just leave it .txt and change the command to bglcomp "B58 Hustler AI.txt" either way will work.)

Jim
 
Back
Top