Jump to content
Sign in to follow this  
Mudhen

Excluding Autogen with ADE for FSX

Recommended Posts

I have the full download of ADEx 1.50 and want to exclude an autogen water tank in FSX. If I read the User Manual correctly, I can do this by creating some sort of polygon, then excluding (also somehow, haven't read the manual in depth yet. My first look at the U/M suggests that I start by entering an airport code. But the autogen I want to exclude is not part of the airport. It's about 5 miles away. If what I want to do can be done, I'll spend quite a bit of time with trial and error. If it can be done, can someone provide a summary of what I'll need to do?My system is Win 7 64-bit.Thanks Much, MH

Share this post


Link to post
Share on other sites

All you need is a short piece of xml code which you can compile with BglComp.Here is a template, replace the values in latitudeMinimum, latitudeMaximum, longitudeMinimum and longitudeMaximum with the coordinates surrounding your water tank.

 <?xml version="1.0"?><FSDataversion = "9.0"xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'xsi:noNamespaceSchemaLocation="bglcomp.xsd" ><ExclusionRectanglelatitudeMinimum = "55.9407546"latitudeMaximum = "55.9431788"longitudeMinimum = "-3.2423336"longitudeMaximum = "-3.2394298"excludeAllObjects = "TRUE"/></FSData> 

Share this post


Link to post
Share on other sites

This may be a duplicate post. I needed to edit in the long/lat.It has been several years since I looked at XML. I'll have to dig back in my archives to see what to do with this.I'll speculate: Once I've used FSX in slew mode to determine the coordinates of the autogen object I want to exclude, I plug the numbers into your code. But first, how do I create an XML file? I created a new Notepad file, plugged in your code, and forced it to save as an XML file. Then I selected "Open With" and chose XML Editor but it doesn't let me change the data. I'm doing something very wrong. I did find an xml2shp.exe file that came with ADE, but I don't know how it's used.Once I get an XML file built I think I use blgcomp.exe, which creates a bgl file, which I think I should paste to the addon sceneryscenery folder. Another thing, FSX long/lat is expressed differently (can't remember the two designation types) than in your sample code. I'll either need to convert or find out if I can get FSX to FSX says:NW corner is at 35* 55.13'N and 78* 44.66'WSE corner is at 35* 55.10'N and 78* 44.63WGoogleEarth designates the same approximate coordinate as:NW corner is at 35* 55' 07.73"N and 78* 44' 39.01"WSE corner is at 35* 55' 06.89"N and 78* 44' 37.53"WI can't figure out how to convert either of these forms to the form you provided in your sample XML file. I don't think FSX's designation of 35* 55.13'N would equal 35.5513, or that 78* 44.66'W would equal -78.4466 would they? Also, the values in your model XML file have seven decimal places, not four, as I came up with. What must I do here?MH

Share this post


Link to post
Share on other sites

Latitude and longitude may be given in decimal degrees or degrees minutes and seconds. I find it easier to work in decimal degrees.Note. west and south are negative.The xml editor will not work without a schema. Just use Notepad and save with a .xml extension.Unfotunately I cannot attach either an xml or zip file so you will need to copy the following. (but see later).

<?xml version="1.0"?><FSDataversion = "9.0"xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'xsi:noNamespaceSchemaLocation="bglcomp.xsd" ><ExclusionRectanglelatitudeMinimum = "35 55.1"latitudeMaximum = "35 55.13 "longitudeMinimum = "-78 44.66"longitudeMaximum = "-78 44.63"excludeAllObjects = "TRUE"/></FSData>

Compile with BglComp and place the .bgl in any active scenery area.You can download the souce and bgl from:http://www.geo-davison.demon.co.uk/Exclusion.zipNow you see itnowyouseeit.jpgNow you don'tnowyoudont.jpgI strongly urge you to try compiling it yourself.George

Share this post


Link to post
Share on other sites

Hi George:Those trees look rather nice in your example screenies above. Shocked.gifAre those custom trees ?And if so, is the particular scenery package(s) they are from available somewhere for download and/or purchase ? Confused.gifThanks for your help, smile.pngGaryGB

Share this post


Link to post
Share on other sites

Compiling it myself has always been my intention. I merely needed some help with XML file creation and the compiling process. Thanks for the update to your sample. I was on the right track.Unfortunately I haven't figured out which utility I must use (Notepad?) to create an XML file into which I can put the source, save, and then compile using bglcomp. I've scoured the Internet and gathered bits and pieces of the process, but I will have to experiment to make it work. Hopefully I can do that without taking any more of your time.Thanks and Best Regards, MHI clicked the link you provided but the page didn't display. The compatibility icon showed "broken," so there may be a compatibility issue of some sort. I can't isolate the problem even using IE9 help. Oh well, probably wasn't critical anyway.MH

Share this post


Link to post
Share on other sites
I clicked the link you provided but the page didn't display. The compatibility icon showed "broken," so there may be a compatibility issue of some sort. I can't isolate the problem even using IE9 help. Oh well, probably wasn't critical anyway.MH
For some reason clicking on the link doesn't work. Copy/paste the link into IE.In fact, if you click on "Exclusion.zip" in the above link it should work.
Are those custom trees ?And if so, is the particular scenery package(s) they are from available somewhere for download and/or purchase ? Confused.gifThanks for your help, smile.pngGaryGB
Nope, vanilla FSX.Ah, they could be replacement tree textures from Earth Simulations.

Share this post


Link to post
Share on other sites

Hi George:Would the replacement tree textures from Earth Simulations be from a particular package amongst their numerous offerings ? Confused.gifThanks again. smile.pngA Note To The OP "Mudhen" aka "MH":Read the ADE Manual, section 15.2 et.seq. on "Terrain Polygon Tool" for additional info. wink.pngBTW: You can use Windows NotePad to create / edit XML code which is then compiled to a BGL via FSX SDK BGLCompiler (aka "BGLComp").FYI: When saving such a file in NotePad from Menu > File > Save As... browse dialog, be sure to set:* Save as type to "All Files"* Encoding: "ANSI"...and use "XML" as the file name extension, otherwise the file gets saved with a "TXT" file extension by default, which won't work with BGLComp.To summarize the work-flow:1.) Be sure the following files are all in your work folder:a.) "BglComp.exe"b.) "bglcomp.xsd"c.) "Exclude_Oil_Tank.xml" (or your own exclude.xml file name)2.) Drag-N'-Drop the "Exclude_Oil_Tank.xml" (or your own exclude.xml file name) file onto BGLComp3.) Assuming a BGL is then successfully made (it will appear in your work folder afterward):a.) Add it to [FSX install path]Addon SceneryScenery sub-folder if the object is from FSX' own autogen annotations on default scenery...OR:b.) If the object is from a 3rd party add-on scenery package autogen annotation:(1.) Add the exclude BGL in a scenery layer above the 3rd party add-on scenery package in the (upper) FSX Scenery Library GUI stack of layers (areas)ex: Add it to a new [FSX install path]Addon SceneryOil_Tank_ExcludeScenery sub-folder(2.) Add a new "Area" near the 'top' of FSX Scenery Library for [FSX install path]Addon SceneryOil_Tank_ExcludeScenery4.) Test it in FSX ! cool.pngHope this helps get you started a bit easier ! Angel.gifGaryGB

Share this post


Link to post
Share on other sites

GaryGB,Thanks very much. I think this is just what i've been looking for.I was able to figure out some of it. I did find Section 51.2 in the ADE U/M, but I'm not sure if any of that is relevant now, because GHD's work and yours don't seem to involve creating a polygon. Need I do that?One thing I wasn't aware of was the ANSI Encoding option. I had already tried what you said - creating the source in Notepad and specifying All Files as the Save as type. As the File Name I specified exclude_tank.xml and it saved an XML file, which I compiled using bglcomp.exe and the end result was an exclude_tank.bgl file. At the time, I wasn't sure how to specify the long/lat in the XML so basically what I did was a dry run.I realize that I should place it high in the FSX scenery list; in fact I was going to put it in the Addon Scenery path. So I think I'm ready to try this for real.One final thing, When I right-click on the XML file and mouse-over Open With in the popup list, one of the options is XML Editor. If I select that, the file opens in a browser window and it is uneditable. Do you know what's up with that?MH

Share this post


Link to post
Share on other sites
One final thing, When I right-click on the XML file and mouse-over Open With in the popup list, one of the options is XML Editor. If I select that, the file opens in a browser window and it is uneditable. Do you know what's up with that?
A browser is not an xml editor.

Share this post


Link to post
Share on other sites

Hello:ADE Manual, section 15.2 et.seq. on "Terrain Polygon Tool" shows in the illustration where one clicks on "Add Polygon" to begin making one's Exclude object entirely within ADE itself.Additionally at the end of ADE Manual 14.3 - "Exclusion Rectangles", one is instructed as to what attributes should be used when following the procedure in Section 15.2 et.seq. on "Terrain Polygon Tool"...to make an Exclude for Autogen.After drawing ones desired coverage area as a Polygon, applying the "Airport Background" > "Exclude Autogen" attribute in the Polygon Properties dialog, one would click "OK" to keep that Exclude Polygon object, save the ADE project, then "Compile Airport": a Exclude BGL would thus be created by ADEThat BGL found in your specified output folder would then be moved or copied to either of 2 folder locations as described in my post above according to what scenery generated the autogen object: FSX default scenery, or a 3rd party add-on.The work-flow presented above is so you know what to do when you opt to make the Exclude "exclusively" using ADE. Idea.gifIIUC, George was describing how to make an Exclude using a manual "XML exclude rectangle" method, which also works acceptably, and is perhaps preferable to some folks as it also allows control over what objects one is trying to exclude. Nerd.gifRegarding a XML file opened in "XML Editor" that is a browser window "non-editor", Windows' file association for XML defaults to the MSIE GUI for display of XML code, and as George says, this is not an actual editor, and is only usable to "inspect" XML code.There is a standalone free "XML Notepad 2007" editor released by MS:http://www.microsoft...ls.aspx?id=7973But, IMHO, it is preferable to use either NotePad or a 3rd party XML-capable text editor such as...Context: http://www.contexteditor.org/Or...Notepad++: http://notepad-plus-plus.org/ BTW: Notepad++ has a very cool feature allowing expanding or shrinking XML element code sections while working. Applause.gifHope this helps explain a bit more ! smile.pngGaryGB

Share this post


Link to post
Share on other sites
Hello:ADE Manual, section 15.2 et.seq. on "Terrain Polygon Tool" shows in the illustration where one clicks on "Add Polygon" to begin making one's Exclude object entirely within ADE itself.Additionally at the end of ADE Manual 14.3 - "Exclusion Rectangles", one is instructed as to what attributes should be used when following the procedure in Section 15.2 et.seq. on "Terrain Polygon Tool"...to make an Exclude for Autogen.After drawing ones desired coverage area as a Polygon, applying the "Airport Background" > "Exclude Autogen" attribute in the Polygon Properties dialog, one would click "OK" to keep that Exclude Polygon object, save the ADE project, then "Compile Airport": a Exclude BGL would thus be created by ADEThat BGL found in your specified output folder would then be moved or copied to either of 2 folder locations as described in my post above according to what scenery generated the autogen object: FSX default scenery, or a 3rd party add-on.
Should be easiest method. Note that when you compile the airport, two bgl files are created. One for the airport you can throw away. The other one (cvx) is the one to use.Also agree Notepad++ is a great little text editor. There are also some good plug-ins for it such as "XML Tools". scott s..

Share this post


Link to post
Share on other sites

Thanks for all the information. Very helpful.However, after installing Notepad++ and typing in the source code, I closed and reopened the file and all the elements were on one line. I've looked everywhere I can think of in the documentation but can't find out how to display it in the indented form so it's easier to read and modify. You mentioned expanding and shrinking and maybe that's what i should be doing but I can't find anything about that in the Help info. How can I get this to display like I want?MH

Share this post


Link to post
Share on other sites
However, after installing Notepad++ and typing in the source code, I closed and reopened the file and all the elements were on one line.
Forget about fancy editors, just use Notepad as you did initially (with the incorrect coordinates), but use the correct coordinates.Note. An exclusion polygon is not what you want.

Share this post


Link to post
Share on other sites

Hi "Mudhen":I should have personally checked live in FS at the location in question before assuming it was an autogen object; sorry for any confusion. Black%20Eye.gifGeorge is correct that the "water tank" was placed in the default FS scenery as a XML scenery library object (via placement code in OBX27190.BGL) :Applause:IIUC, this object is located SW of the Bethany Hills Baptist Church premises at 11701 Leesville Road, Raleigh, NC near the corner at Dominion Blvd.GoogleEarth "jump" coordinates: 35.9187764812014,-78.7438911444237 (center of "water tank" object as placed in FSX)Object Library: Hazards.BGLObject Name: "gen_tank01"Object GUID: {7549DBA5-8710-4C0F-BF62-324244D86C31}Object Base Size: 48.68, 32.08, 48.67 (Length, Height, Width in Meters)Although it is possible to place XML-based scenery library objects via custom autogen "meta-objects", this "water tank" is not an autogen object placement.The exclude for this non-autogen object placement must be of the XML type described by George above, NOT a CVX vector type BGL.Shame%20On%20You.gifAlthough one can indeed exclude it by the excludeAllObjects = "TRUE" statement as shown, if one wishes to retain "other" objects in the area, one can do so with a modified version of the "complete" XML type Exclude Rectangle statement template as discussed in this MS FSX / ESP SDK Doc:http://msdn.microsof...lusionRectangleGeorge likely also has good intentions as a tutor here, IMHO, in showing benefits to keeping things simple at first by using NotePad. Angel.gifIndented XML Elements made possible via TABs and/or a "fancy XML editor" can be helpful in creating / editing / proof-reading XML code when one gets into more complex files later on; but for starters, an exclude rectangle is probably the least complex FS-related XML code one might see in relation to BGLComp source code ...for initial learning purposes within NotePad.And of course, XML Elements don't actually 'have' to be indented to work when compiled, as BGLComp also accepts input parameters in both a flush-left and/or "wide display format" ...on a very long line.Additionally BGLComp also tolerates both decimal minutes versus decimal degrees as Lat-Lon coordinate input data, and furthermore it accepts both Feet or Meters as input data... providing it is all "labeled properly".FYI: My own "water tank" XML Exclude Rectangle... as an example of how to do this (while retaining ex: "Generic Building" objects): :(

version = "9.0"xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'xsi:noNamespaceSchemaLocation="bglcomp.xsd" >latitudeMinimum = "35.9185547804854"latitudeMaximum = "35.9189870814866"longitudeMinimum = "-78.7441805861611"longitudeMaximum = "-78.7436195141788"excludeAllObjects = "FALSE"excludeBeaconObjects = "TRUE"excludeEffectObjects = "TRUE"excludeExtrusionBridgeObjects = "TRUE"excludeGenericBuildingObjects = "FALSE"excludeLibraryObjects = "TRUE"excludeTaxiwaySignObjects = "TRUE"excludeTriggerObjects = "TRUE"excludeWindsockObjects = "TRUE"/>

Note that I have set:excludeAllObjects = "FALSE"excludeGenericBuildingObjects = "FALSE"...but I set excludeLibraryObjects = "TRUE"... to eradicate XML-placed scenery library objects within the Exclude Rectangle. :(PS: If you do wish to eradicate ALL objects (except "autogen"... which requires a separate CVX vector type Autogen Exclude Polygon BGL as described above), use Georges code; or set mine to this:

version = "9.0"xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'xsi:noNamespaceSchemaLocation="bglcomp.xsd" >latitudeMinimum = "35.9185547804854"latitudeMaximum = "35.9189870814866"longitudeMinimum = "-78.7441805861611"longitudeMaximum = "-78.7436195141788"excludeAllObjects = "TRUE"excludeBeaconObjects = "TRUE"excludeEffectObjects = "TRUE"excludeExtrusionBridgeObjects = "TRUE"excludeGenericBuildingObjects = "TRUE"excludeLibraryObjects = "TRUE"excludeTaxiwaySignObjects = "TRUE"excludeTriggerObjects = "TRUE"excludeWindsockObjects = "TRUE"/>

NOTE: If excludeAllObjects = "TRUE" is used, one need not include all the other listed optional objects below, and the XML Exclude Rectangle code can be kept ....as simple as George shows it above at:http://forum.avsim.n...ost__p__2189864Hope this helps ! :smile:GaryGB

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...