-------------------------------------------------
| FlattEx - Flatten and Exclude Capture Program |
-------------------------------------------------

made by Mario Corallo, October 18th 2005
marioedani@virgilio.it

---------------------------------------------
powered with FDSConnect by Flight Deck Software



WHAT IS IT
----------

FlattEx is a simple utility that tries to help simmers to easely create
"Flatten" and "Exclude" lines to be inserted in the SCENERY.CFG file.
Flatten and Exclude statements are explained in the FS2000 Scenery SDK
(by Microsoft) and have the scope, respectively, to force a flat area or
to remove scenery objects (3d objects, vors, ndbs) from an area.

As the flightsim enthusiasts know, when you install new sceneries you can
experience some places that should be flat (like an airport or the
center of a town) but they aren't because you have downloaded and added that
beautiful mesh scenery, or you can find that there are trees or buildings
near a runway so that take-offs or landings are impossible.

One easy solution is to add "Flatten" and "Exclude" lines to the SCENERY.CFG file
and restart FS, but... it's a so annoying operation, especially for "flattens".
You have to move the aircraft to one corner of the area, write down the coordinates
(latitude and longitude), then move the aircraft to the other corner(s)
and write the coordinates again. Then you must note wich are northern and wich
are eastern. Then write them in the correct order: clockwise.
Finally you must guess the desired GROUND altitude: I say "guess" because FS
displays the altitude of the AIRCRAFT; then you have to know how high is your
aircraft to "guess" the altitude of the terrain.

Well, with this utility you will do the following...



HOW TO USE IT
-------------

1. Start FS and go to a place that you want to flatten or in wich you want to
remove objects
2. In "Map view" set "Heading" to "0" (zero) in order to point to North.
3. Start FlattEx (you can start FlattEx even before or after FS, it's the same)
4. Enter "Down view" (Ctrl+S) and "Slew mode" (Y)
5. Move your aircraft into the North/West corner of the area you want to flatten or
clean (up/left corner)
6. Switch to FlattEx and click the "NW" button: current latitude and longitude will
be captured from FS and displayed by FlattEx.
7. Switch to FS again and move your aircraft to the South/East corner of the area
(down/right corner)
8. Switch to FlattEx and click the "SE" button: current latitude and longitude will
be captured from FS and displayed by FlattEx.
9. Now position your aircraft in a place having the altitude you want (i.e. on the
rynway of the airport)
10. Switch to FlattEx and click the "Ground Altitude" button: the gound altitude
too will be captured from FS
11. Now you have enough data to produce a "Rectangular Flatten" line or an "Exclude"
line: simply press the "Generate SCENERY.CFG Line" button, then copy the
generated line to the clipboard and paste it to the SCENERY.CFG file.
12. Restart FS when done.

You can keep the captured values to generate both "Exclude" and "Flatten" lines.

If you want to flatten a non-rectangular area you can select "4-Sided Polygon"
in the "Area" options, but you will need to capture 2 more positions ("NE" and "SW").

If you want to create an "Exclude" you can choose WHAT to exclude from the scenery
using the "Exclude Type" check boxes.

REMEBER to click on the "Generate SCENERY.CFG Line" button each time you change
an option, to create the new line.

Also REMEBER to renumber the "Flatten.0" statement if you have more than one "Flatten"
referred to the same scenery ("Flatten.1", "Flatten.2", etc).



THIS COULD BE ENOUGH BUT...
---------------------------

If you are not confident with the editing of the SCENERY.CFG file or you want
to do it faster and in a more easy way, then click on the right-most button,
the one with a 'right arrow' icon.

The program automatically discovers wich FS versions you have currently
installed on your system and reads data from the SCENERY.CFG of the most
recent FS.
All the sceneries are listed, sorted as FS does (based on the layer number)
and an "A" is shown in all the "ACTIVE" sceneries.

When you select a scenery, all the "Flatten" and "Exclude" lines, are reported
in the bottom fields.

You can:
- Edit those lines with a Double-Click (only the altitude of the Flattens can
be changed)
- Delete them clicking the red X button, or
- Add the newly generated line:
1. Press and hold the mouse on the "Generate SCENERY.CFG Line" button
2. DRAG & DROP it to the right side, onto a "Flatten" or "Exclude" field:
- if you "drop" your line onto an empty field, your line will be added
- if you "drop" onto a non-empty field, older data will replaced by the
new one.



DON'T WORRY...
--------------

.Every time you intend to modify something, a confirmation will be asked to you
.If you modify something, before closing FlattEx or before moving to another
SCENERY.CFG a confirmation will be asked too (unless you Save the new SCENERY.CFG
using the "Save CFG" button).
.If you press the "Save CFG" button it will be asked for a confirmation and,
if you say "Yes", a copy of the previous SCENERY.CFG file is generated in
the same folder (FS home directory). The first time you save, the previous version
of the file will be renamed in "SCENERY_FlattEx.CFG". All the subsequent times it
will be renamed in "SCENERY_FlattEx[n].CFG", where n is a number incremented by 1
every time you save.



HOW TO INSTALL IT
-----------------

This program can be extracted in any folder.
The only thing to do (if not previously done) is:
- Extract the FDSConnection.DLL file corresponding to the correct FS version
and copy it to the FS "MODULES" folder. If you don't, you won't be able
to capture position and altitude from FS (all values will be "0").



SOFTWARE REQUIREMENTS
---------------------

FDSConnect module has been included following what authors affirm
in their forum:
"...FDSConnect can be redistributed freely with your packages..."
Download link is:
http://www.flightdecksoftware.com/downloads/FDSConnection-v1.4.zip


FlattEx needs the "MSVBVM60.DLL" library and the "COMCTL32.OCX" control.
Generally both are available on most systems, otherwise you can download
them from the Microsoft site:

MSVBVM60.DLL is included in "Visual Basic 6.0 SP5: Run-Time
Redistribution Pack (vbrun60sp5.exe)" and can be found here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=bf9a24f9-b5c5-48f4-8edd-cdf2d29a79d5&DisplayLang=en

COMCTL32.OCX is included in "Microsoft Visual Basic 6.0 Common Controls"
and can be found here:
http://www.microsoft.com/downloads/details.aspx?familyid=25437D98-51D0-41C1-BB14-64662F5F62FE&displaylang=en



COPYRIGHT AND DISTRIBUTION
--------------------------

This utility "FlattEx" is released as FREEWARE by Mario Corallo.

As freeware you are permitted to distribute this archive subject
to the following conditions:
- The archive must be distributed without modification to the
contents of the archive. Redistributing this archive with any files
added, removed or modified is prohibited.
- The inclusion of any individual file from this archive in another
archive without the prior permission of the author is prohibited.
- No charge may be made for this archive other than that to cover the
cost of its distribution. If a fee is charged it must be made clear
to the purchaser that the archive is freeware and that the fee is to
cover the distributor's costs of providing the archive.
- The authors' rights and wishes concerning this archive must be
respected.

Copyright 2005 by Mario Corallo. All Rights Reserved.


For any question, send an e-mail to:
"marioedani@virgilio.it"