Flight Simulator 2004
Home Forums Forums     Knowledge Base KB     User Reviews Reviews     Downloads Downloads     Screenshot Gallery Gallery     Quizzes Quizzes     Merchandise Merchandise     Top Site List Top Sites     Search Search
Browse by Category
   
Search  
      Glossary

FSX Forum
Coming soon: Flight Sim X! Screenshots, features, the announcement, and more information may be found here. Official release date is Christmas 2006.
www.fs2004.com

Bluetooth Accessories
Got all Blue? We have a huge selection for your bluetooth needs!
www.gotallblue.com

Your Text Link Here
Contact FS2004.com for more information.
www.fs2004.com/ad
Flight Simulator Knowledge Base .: Tutorials .: FS2004 Tutorials .: FS2004 Development .: Creating an Exclude Zone

Creating an Exclude Zone

Those who would like to create exclude zones without the use of 3rd party programs (and the associated learning curve) and without modifying the scenery.cfg file, may find this useful. WordPad, AFCAD, and the bglcomp_SDK are required.



Step 1: Create a work directory (or, you can simply use the same directory in which you installed the bglcomp_SDK). If you decide to use a work directory, move or copy bglcomp.exe and bglcomp.xsd into this directory.

Step 2: Open Wordpad and create the following lines of code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<FSData version="9.0" xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation="bglcomp.xsd" >
<ExclusionRectangle
     latitudeMinimum="N41 38.3300"
     latitudeMaximum="N41 40.7680"
     longitudeMinimum="W116 45.2300"
     longitudeMaximum="W116 43.9950"
     excludeAllObjects = "FALSE"
     excludeBeaconObjects = "FALSE"
     excludeEffectObjects = "FALSE"
     excludeGenericBuildingObjects = "FALSE"
     excludeLibraryObjects = "FALSE"
     excludeTaxiwaySignObjects = "FALSE"
     excludeTriggerObjects = "FALSE"
     excludeWindsockObjects = "FALSE"/>
</FSData>
Be certain you type the code EXACTLY as it appears above. One space, one character that is not precise will cause blgcomp to abort the compilation to BGL. To make this work, all you need are the northern-/western-most latitude/longitude and southern-/eastern-most latitude/longitude of the area containing the objects you wish to exclude.

Step 3: Open your airport in AFCAD and determine the boundaries of the area you wish to be affected by the exclusion. (Hint: I normally just use the "apron route" tool to draw a box around the area.) Find the lat/lon of the upper-left corner of the box, then find the lat/lon of the lower-right corner of the box, and write them down.

Step 4: Enter your data into the code you just created. Change
latitudeMinimum="N41 38.3300"
to the latitude you wrote down for the lower-right corner of the box. Change
latitudeMaximum="N41 40.7680"
to the latitude you wrote down for the upper-left corner of the box. Change
longitudeMinimum="W116 45.2300"
to the longitude you wrote down for the upper-left corner of the box. Change
longitudeMaximum="W116 43.9950"
to the longitude you wrote down for the lower-right corner of the box.

An easy way to remember it is latitude first, longitude second, in the order BOTTOM TOP TOP BOTTOM. Don't try it with SMALL BIG BIG SMALL as that relationship will change in the southern latitudes and eastern longitudes -- keep it BOTTOM TOP TOP BOTTOM.

Change the BOOLEAN statements
excludeAllObjects = "FALSE"
excludeBeaconObjects = "FALSE"
excludeEffectObjects = "FALSE"
excludeGenericBuildingObjects = "FALSE"
excludeLibraryObjects = "FALSE"
excludeTaxiwaySignObjects = "FALSE"
excludeTriggerObjects = "FALSE"
excludeWindsockObjects = "FALSE"/>
as required. If you want all objects to be excluded, change "FALSE" to "TRUE" in the first statement. If you only want to remove taxiway signs, leave everything else "FALSE" and change the sixth line to "TRUE". You may have to play with these lines a bit to ensure what you want excluded actually gets excluded. For instance, setting excludeAllObjects = "TRUE" does not always remove refueling points. You must also set excludeTriggerObjects = "TRUE".

You can also have more than one exclude zone. Simply copy-paste
<ExclusionRectangle
     latitudeMinimum="N41 38.3300"
     latitudeMaximum="N41 40.7680"
     longitudeMinimum="W116 45.2300"
     longitudeMaximum="W116 43.9950"
     excludeAllObjects = "FALSE"
     excludeBeaconObjects = "FALSE"
     excludeEffectObjects = "FALSE"
     excludeGenericBuildingObjects = "FALSE"
     excludeLibraryObjects = "FALSE"
     excludeTaxiwaySignObjects = "FALSE"
     excludeTriggerObjects = "FALSE"
     excludeWindsockObjects = "FALSE"/>
as many times as you need, until you have entered the last area. Put in the actual lats/lons of each area (BOTTOM TOP TOP BOTTOM, remember?). Just make sure that </FSData> is the last line.

Step 5: On Wordpad's top toolbar, select "File" then "Save As" and give the file a unique name. My method is to use the ICAO of the airport in the filename (i.e. KPSM_Excl). Change the file extension to .XML and save the file into the same directory you have bglcomp.exe and bglcomp.xsd located. Now, drag-and-drop the XML file onto the bglcomp.exe icon. Wait a few seconds, and if you have typed the code in correctly, a BGL with the same name as the XML file will appear (i.e. KPSM_Excl.BGL). Place this BGL in your airport's Scenery folder. You're finished.



Word of Caution: If you are going to provide your creation for others to use, be sure you turn your autogen slider all the way up to 100%. That's the only way you are going to find exactly what kind of objects are in the area you wish to exclude. You may find a windsock (which has its own BOOLEAN line) that you hadn't seen before because your slider was too low. If you only set excludeAllObjects = "TRUE", then another person who installs your design may suddenly be faced with that windsock right in the middle of the expanded ramp you made.

How helpful was this article to you?

Related Articles

article Creating A Flatten Zone
- Requires AFCAD and SCASMThose who would like to create flatten zones without the use of 3rd...

(No rating)  4-14-2006    Views: 1896   
article Creating a Library of API Objects
- Requires both API and SCAFirst, you cannot create a usable LibraryObjects file of API objects...

  4-5-2006    Views: 1556   

User Comments

Add Comment
No comments have been posted.


.: Powered by Lore 1.5.6
All content and images are copyright FS2004.com and its owners. All rights reserved.