Workflow to convert closerd polylines into Flight Simulator X autogen files
ver. 1.0 
by Ole Egholm

NOTE:
requires postprocessing using Arno Gerretsens txt2agn tool (http://msmvps.com/blogs/arnogerretsen/)



Workflow:

1	create a directory for the three .py files.

2	The scripts need additional python libraries to function.
	the files are found in: 
	...\Program Files\Rhinoceros 5.0 WIP (64-bit)\Plug-ins\IronPython\Lib
	copy these files to the same directory as the autogen .py files

3	open Rhino and import polylines you want to convert to FS forests.
	the data must be located in a UTM coordinate system, and the data must be closed polylines
	
4	type editpythonscript in the rhino command line

5	the conversion is a three step process;
		a. SplitByLodCells
		b. GroupLods
		c. GenerateAgn

6	run the SplitByLodCells script (press the green play-button in the pythonscript editor)
	select the polylines and hit enter.
	This process splits the polylines when they span more than one LOD cell
	
7	after this first step the data needs a bit of post-processing:
	type SelName in the rhino command line to select and then delete all objects with "noName". (the source objects)
	
8	run the GroupLods script
	all this script does is grouping the polylines by LOD cells. 
	
9	type SelName again and select any objects without a name (if any)

10	run the GenerateAgn script
	the GUID used can be altered in this line in the code:
	guidTree = "49124CD4-8C3F-4333-8520-FD802184B91D"
	
11	this generates a number of .txt files and a .bat file. The text files can be compressed into .agn files
	using Arno Gerretsens txt2agn tool (http://msmvps.com/blogs/arnogerretsen/)
	put the .bat file and .txt files in the same directory as the tool, and run the .bat file.
	
12	the .agn files are put in the root, (c:/). This can be changed in the script.