Sign in to follow this  
Guest cwright

Automatic ASM creation

Recommended Posts

I've written a Visual Basic program that automatically converts a set of lat/long coordinates to the corresponding ASM file that can be compiled by BGLC. It generates a simple lake as described in Dick's excellent tutorial. I've included an example ASM file below. It's for a 32-sided circle. Currently the program generates the lat/long coordinates from a mathematical formula. I plan to extend the program to accept input in the form of a list of coordinates or a hand-drawn .raw bitmap. Also I will update it in the light of new techniques arising from the release of the SDK. Hopefully Dick will release a new tutorial in the fullness of time! Unfortunately I can't compile .exe files, but when the program is a bit more developed I'll make the VB5 source available for download from my site. With the limited testing I've done so far it seems to generate the correct data. However, there's a small problemette. Look at the screenshot. This is the 32-sided circle generated by the example ASM below. There are five LOD13 boxes with at least three points. They are faithfully reproduced as polygons. The LOD13 boxes with less than three points don't appear. For some reason FS is failing to join the polygons across the LOD13 boundaries. Does anyone have any ideas? Many thanks. If I make the circle smaller so that it fits into one LOD13 box then it works fine. If I make a huge circle that fills several LOD8 boxes it still fails in the same way..... At last I'm close to building coastlines. Many thanks to Dick and all the others. Best regards, Chrishttp://www.kline.demon.co.uk/circle.jpginclude TMFmacros.incinclude CFS2TMFmacros.inc ; ===================================================================; 32-sided circle at N1 52 E41 52; DATA_BASE data_base label word dw 1 ; world set number dd 9890619 ; North Bound dd -9890619 ; South Bound dd 2135553183 ; East Bound dd -2135553184 ; West Bound dd 0 ; VOR data dw 0 ; lowest VOR freq dw 0 ; highest VOR freq dd 0 ; seeds level 8 data dd 0 ; seeds level 9 data dd 0 ; seeds level 10 data dd 0 ; seeds level 11 data dd 0 ; seeds level 12 data dd 0 ; traffic data dd 0 ; minimum safe altitude data dd terrain_data - data_base ; terrain mesh data dd 0 ; object data dd 0 ; library data dd 0 ; facilities data dd 0 ; anchor point data dd 0 ; ATIS data dd 0 ; NDB data dd 0 ; dynamic object paths data dd 0h,0h ; minimum library id dd 0h,0h ; maximum library id dd 0 ; miscellaneous data dd 0 ; title and description data dd 0 ; magnetic variation data dd 0 ; exception and exclusion data dd 87654321h ; magic number dd 0 ; compression switch dw 0 ; spare dd 0h,0h,0h,0h ; GUID dd 0 ; product id dd 0 ; product build number dd 0 ; new facility data pointers dd 0 ; new facility name list data dd 0 ; new facility band list data dd 0 ; new facility data; ===================================================================; TERRAIN_DATAterrain_data label word dd terrain_header_end - terrain_data ; end of terrain header dd 514 ; version dd 0 ; unknown entry dd 0 ; unknown entry dd 0 ; elevation header dd 0 ; land class header dd 0 ; unknown header dd 0 ; class lookup header dd 0 ; season header dd 0 ; class lookup list dd 0 ; water class header dd 0 ; elevation index dd 0 ; land cover index dd 0 ; unknown index dd flatten_header - terrain_data ; flatten polygon header dd 0 ; decal header dd 0 ; reserved dd 0 ; reserved dd 0 ; main terrain data dd 0 ; reserved dd 0 ; reserved dd 0 ; reserved dd 0 ; regions header dd 0 ; reserved dd 0 ; reserved terrain_header_end label word ;============================================================= ; TERRAIN FLATTEN POLYGON HEADERflatten_header label word FLATTEN_HEADER 513, flatten_list, flatten_data, flatten_end; TERRAIN FLATTEN POLYGON DATAflatten_data label worddata_start_0 label word FLATTEN_DATA 1, 2, 1, 22,1,1,1 FLATTEN_POLYGON 1,605,0 FLATTEN_POINT 1, 174data_end_0 label worddata_start_1 label word FLATTEN_DATA 1, 2, 0, 22,1,1,1 FLATTEN_POLYGON 4,605,0 FLATTEN_POINT 253, 129 FLATTEN_POINT 243, 85 FLATTEN_POINT 227, 45 FLATTEN_POINT 205, 10data_end_1 label worddata_start_2 label word FLATTEN_DATA 1, 2, 0, 21,1,1,1 FLATTEN_POLYGON 6,605,0 FLATTEN_POINT 179, 236 FLATTEN_POINT 148, 214 FLATTEN_POINT 116, 201 FLATTEN_POINT 82, 197 FLATTEN_POINT 48, 201 FLATTEN_POINT 15, 214data_end_2 label worddata_start_3 label word FLATTEN_DATA 1, 1, 3, 21,1,1,1 FLATTEN_POLYGON 1,605,0 FLATTEN_POINT 240, 236data_end_3 label worddata_start_4 label word FLATTEN_DATA 1, 1, 3, 22,1,1,1 FLATTEN_POLYGON 6,605,0 FLATTEN_POINT 214, 10 FLATTEN_POINT 192, 45 FLATTEN_POINT 176, 85 FLATTEN_POINT 166, 129 FLATTEN_POINT 163, 174 FLATTEN_POINT 166, 219data_end_4 label worddata_start_5 label word FLATTEN_DATA 1, 1, 3, 23,1,1,1 FLATTEN_POLYGON 4,605,0 FLATTEN_POINT 176, 8 FLATTEN_POINT 192, 48 FLATTEN_POINT 214, 83 FLATTEN_POINT 240, 112data_end_5 label worddata_start_6 label word FLATTEN_DATA 1, 2, 0, 23,1,1,1 FLATTEN_POLYGON 9,605,0 FLATTEN_POINT 15, 133 FLATTEN_POINT 48, 146 FLATTEN_POINT 82, 151 FLATTEN_POINT 116, 146 FLATTEN_POINT 148, 133 FLATTEN_POINT 179, 112 FLATTEN_POINT 205, 83 FLATTEN_POINT 227, 48 FLATTEN_POINT 243, 8data_end_6 label worddata_start_7 label word FLATTEN_DATA 1, 2, 0, 22,1,1,1 FLATTEN_POLYGON 1,605,0 FLATTEN_POINT 253, 219data_end_7 label word; TERRAIN FLATTEN POLYGON LISTflatten_list label word FLATTEN_LIST 1, flatten_groupsflatten_groups label word FLATTEN_GROUP 250, 473,flatten_data,data_start_0,data_end_7flatten_end label word

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hello Chris,> Currently the program generates the lat/long coordinates >from a mathematical formula. I plan to extend the program to >accept input in the form of a list of coordinates or a >hand-drawn .raw bitmap. Also I will update it in the light >of new techniques arising from the release of the SDK. >Hopefully Dick will release a new tutorial in the fullness >of time! >> Unfortunately I can't compile .exe files, but when the >program is a bit more developed I'll make the VB5 source >available for download from my site. That's a good new, for a while I have been thinking in doing also something like this, but I decided to wait for the sdk files to have more light on the matter....and actually I am on the reading stage, and quite confused by the way on all these Lod's stuff....If I can help you in any way, please let me know, I can compile your program if you wish as well. Rafael

Share this post


Link to post
Share on other sites

Looking at your data and the graphic, it looks to me like your not computing the polygon information to close up the circle. Flight Simulator did exactly what you asked. It created five polygons in five different LOD 13 blocks. Three definitions only have one point. Can't make a polygon out of that. ;) In your five relevent data definitions I don't see a point value of 1 or 255. Your technique works fine for polygons within a LOD-13 block. If you want to cross the LOD-13 or LOD-8 boundries, your going to need to take your points and determine where the line segment defined by those points crosses the boundries. Then your going to have to close up the polygons in each LOD-13 block at those boundries. Flight Simulator does not do this for you. This math exercise is currently what I am working on now in my Terrain Compiler. Lee.

Share this post


Link to post
Share on other sites

Lee, thank you very much, you've definitely put your finger on the problem. In my innocence I assumed that FS would indeed join the polygons (I'm certainly not an expert on this TMF stuff!) I'll try manually adding points on the boundaries and see if that fixes it. Then back to programming.... Once again, many thanks! Best regards, Chris

Share this post


Link to post
Share on other sites

We should really exchange our ideas here!I have come up with the following algorithm (still have to implement it though...):First, simply go through a list of points and insert points on LOD13 boundaries. Then go through a the point list and sort the points into new point lists acoording in which LOD13 quad they are. This easy really easy and convinient. The trick is even if the points are distributed over 2 (or more LOD13 polys), just going through from front to start will separate the points into the appropriate LOD quads and make sure that we get closed polygons.The only problem left is that if there are corners joining, we have to insert the corner vertices. I had the idea, that if a line crosses the LOD13 quad boundary, it has to come back since the polygon is closed. So we just have to check if the line crosses the same boundary twice (or an even number). If the number is odd, then we have to insert a corner, because the line returns on some other boundary. This will only work counter- or clockwise, we have to determine somehow which way round the points go (there should be some algorithm for that) and program this for both directions...This is so much easier to explain on paper, but hopefully you got me.On the other hand maybe there is a tesselation algorithm on the net somewhere we can just use...Any comments?Cheers, Christian

Share this post


Link to post
Share on other sites

Hey Christian...>>First, simply go through a list of points and insert points >on LOD13 boundaries. Then go through a the point list and >sort the points into new point lists acoording in which >LOD13 quad they are. This easy really easy and convinient. >The trick is even if the points are distributed over 2 (or >more LOD13 polys), just going through from front to start >will separate the points into the appropriate LOD quads and >make sure that we get closed polygons. >Yep! That's what I'm looking at doing too! Basically, using simple line-slope formula's, I'm determining where the line segments cross each LOD-13 boundry and inserting the "boundry crossing points" into a dynamic array of LOD-13 regions. The only check I'm still working out is if the polygon returns back into a LOD-13 region, then I have to stop the line generation at that point on the boundry vice taking the segment to a region corner.>The only problem left is that if there are corners joining, >we have to insert the corner vertices. I had the idea, that >if a line crosses the LOD13 quad boundary, it has to come >back since the polygon is closed. So we just have to check >if the line crosses the same boundary twice (or an even >number). If the number is odd, then we have to insert a >corner, because the line returns on some other boundary. >This will only work counter- or clockwise, we have to >determine somehow which way round the points go (there >should be some algorithm for that) and program this for both >directions... >And your solution works nicely with my problem stated above!!! Thanks buddy! As far as determining direction, I'm looking at a clockwise rotation through the line segments. Looking for an algorithm for this. Haven't found much on this (graphics programming is not my strength) so I think I may have come up with something on my own...Put all of the points into a double linked list (linked to both ends). Then find the western most point. Follow the list to the most northern point, then on to the most eastern point, next the southern point and back to the west. Identify the four points in the list before you run the loop and in theory you should be able to run a clockwise circuit around the polygon. In this way, all polygon elements would be closed on the right (vice left, not vice wrong) side of the line segment. Northerly line segments (point 1 [start] is south of point 2 [end]) would have the polygon closing towards the east and southerly line segments (point 1 is north of point 2) would have their polygon close towards the west.Keep em' comming Christian!Lee.

Share this post


Link to post
Share on other sites

>Put all of the points into a double linked list (linked to >both ends). Then find the western most point. Follow the >list to the most northern point, then on to the most eastern >point, next the southern point and back to the west. >Identify the four points in the list before you run the loop >and in theory you should be able to run a clockwise circuit >around the polygon. In this way, all polygon elements would >be closed on the right (vice left, not vice wrong) side of >the line segment. Northerly line segments (point 1 [start] >is south of point 2 [end]) would have the polygon closing >towards the east and southerly line segments (point 1 is >north of point 2) would have their polygon close towards the >west. Had a quick think and I thought your method indeed would be nice to check direction. But: what do you do if you get two points NW and SE, and the rest are in between. You still wouldn't know which direction this goes. Hmm, there must be a simple trick, but can't think of anything. I bet you there is a really simple algorithm, somehow taking the vertices, or using the area inside or so. I don't know much graphics programming either, but usually the algorithms are strikingly simple. I remember once I had to test if a point is within a polygon or not. I came up with something really complicated and the polygon had to be convex. Until someone told me that the trick is to count the line segments a line has to cross to the outside. If it's odd the point is inside. The whole test was a two-liner...Just had an idea:Split polygon into 2 lines using western and eastern most points as endpoints.Calculate the sum of all delta x for both lines and also the mean y.If sum delta x for the smaller mean y is negative and the other one is positive the polygon is counterclockwise. (smaller mean y means 'upper' part of polygon and negative value means east to west).This should work because lines aren't allowed to cross (like in the number 8 where the lines cross in the middle). If they would be allowed to cross, one point from the lower line could potentially lie way above to upper line, and distorting the mean y, but since no point of the lower line is allowed to be above the upper line, the mean y will really separate upper and lower part. Also, because lines aren't allowed to cross, you will get one positive and one negative value for sure... At least that's my theory...Cheers, Christian

Share this post


Link to post
Share on other sites

Hi, Christian. It's nice to see you back in the FS world!>..............>First, simply go through a list of points and insert points >on LOD13 boundaries. Then go through a the point list and >sort the points into new point lists acoording in which >LOD13 quad they are. This easy really easy and convinient. >The trick is even if the points are distributed over 2 (or >more LOD13 polys), just going through from front to start >will separate the points into the appropriate LOD quads and >make sure that we get closed polygons. I think this is about where I am. The program has separated all the points into their LOD8/LOD13 square numbers together with identifying tags, and the coordinates within the LOD13 square. The data is held by a set of arrays. As more points are added to complete each sub-polygon the program will have to do a lot of inserting into the arrays (anyone know if there's a VB function to insert data into arrays?) As Lee mentioned, I would use linear interpolation to find where lines cross square boundaries. Then a routine would 'fill' in the polygon in that LOD13 square by inserting points into the arrays. There are sixteen possible cases e.g. when the polygon enters on the left and exits on the right. Also the routine needs to determine which section of the square has to be filled in. For example if the polygon enters on the left and exits on the right the routine would have to add two interpolated points on the left and right sides, and then two more, either at the two top or the two bottom corners. And so on... And of course all squares that lie inside the polygon but do not touch it would have to be filled in. I only realised the problem after reading Lee's post. It's certainly a biggie! But, particularly after thinking about it last night while trying to get to sleep, I think it's solvable. Depending on the time I can devote to it, I think I can have it working in a week or so. I'll read and try to understand your other comments (and Lee's), but trying to discuss fairly complex geometrical matters with words isn't easy! Best regards, Chris

Share this post


Link to post
Share on other sites

>(anyone know if there's a VB function to >insert data into arrays?) You could try using collections instead of arrays. Haven't used them myself in VB, but shouldn't be hard to pick up... (I use vectors and lists in C++ instead of arrays, makes life much easier...)> I'll read and try to understand your other comments (and >Lee's), but trying to discuss fairly complex geometrical >matters with words isn't easy! It's certainly not. Maybe we should use this Windows NetMeeting (never used it beforehand!) and prove to each other how badly we can draw with the mouse :-lolCheers, Christian

Share this post


Link to post
Share on other sites

>You could try using collections instead of arrays. Haven't >used them myself in VB, but shouldn't be hard to pick up... >(I use vectors and lists in C++ instead of arrays, makes >life much easier...) >Ain't that the truth. I gave up C++ for Delphi a few years ago and haven't looked back. VB, well just say I have version 4.0 collecting dust on a shelf somewhere. I too use lists. But using collections isn't a bad idea. However, Delphi's dynamic arrays are pretty easy to use. And since I can store an array of records (structs for you C folks), it keeps things easy. But I do OOP a lot now (no comments!) and collections work into that really well.>It's certainly not. Maybe we should use this Windows >NetMeeting (never used it beforehand!) and prove to each >other how badly we can draw with the mouse :-lol >I've used Netmeeting at work. It works okay over our T-1 line. But I bet it would cause my 28.8K phone line to melt down! I dusted off my old "Graphic Gems" book tonight and came up with algorithms to determine poly segment to line intersections. Basically I'm using a polygon clipping algorithm without actually clipping the polygon. I had to pull my C hat out too. It's like riding a bike! I think I have everything I need to lay some code down. Hopefully by this weekend I'll have some good news. Lee.

Share this post


Link to post
Share on other sites

>>(anyone know if there's a VB function to >>insert data into arrays?) >>You could try using collections instead of arrays. Haven't >used them myself in VB, but shouldn't be hard to pick up... >(I use vectors and lists in C++ instead of arrays, makes >life much easier...) Hi, Christian, thanks for the suggestion, I'll look into it. However, I've decided on a different approach. For each LOD13 box I'll add six dummy positions in the list. Two will take the extra interpolated points, and the other four will be enough to take the extra points needed to 'fill' the sub-polygon in the box.>> I'll read and try to understand your other comments (and >>Lee's), but trying to discuss fairly complex geometrical >>matters with words isn't easy! >>It's certainly not. Maybe we should use this Windows >NetMeeting (never used it beforehand!) and prove to each >other how badly we can draw with the mouse :-lol As you live at the other end of the world we'd need to be up at some funny times! At least with the forums we don't need to worry about time differences. Don't quote me, but I think I can see how to do the whole thing. Here's a brief summmary: STEP 1 Convert the lat/long coordinates to a list of LOD square numbers and coordinates inside the LOD13 square (already done). STEP 2 Add the interpolated points so that the main polygon touches each LOD13 square on two sides. The two points are placed into the dummy positions. If the 'jump' from one box to the next is non-diagonal (e.g. a jump to the next box on the right) it's straightforward. But if the jump is diagonal then an extra LOD13 box has to be added to the list. That's because a diagonal jump implies that the main polygon passed through a box but had no points in it. There's a special case when the main polygon passes precisely through a corner of a box, but I won't worry about that for now - if it is a problem it should be easily fixed. STEP 3 Create a sub-polygon in each LOD13 square by adding up to four extra points (again, they are placed in the dummy positions). For each LOD13 square the main polygon has an entry point and an exit point (the first and last points in the list for that box). There are sixteen different cases to consider, for example: polygon enters and exits on LH of square, or polygon enters on LH and exits on RH. This is easily detected by comparing the first and last points in the list (they were the points placed in the dummy positions in the previous step). Depending on the case detected, add the points to complete the polygon inside the LOD13 square. Assuming the original lat/long coords go in the clockwise direction, the points added ensure that the polygon is 'filled' on the correct side. For example, suppose the main polygon enters the LOD13 square on the LH and exits on the RH, then a point would be added in the LH and RH bottom corners (i.e. 1,255 and 255,255). STEP 4 Detect all the LOD13 squares that lie inside the main polygon but do not touch it, and 'fill' them in with four points each (I'm assuming that FS won't do this automatically). STEP 5 Convert the data to ASM text (already done). It's not particularly elegant but I believe it should work. With all the number-crunching involved I hope VB doesn't run painfully slow! Best regards, Chris

Share this post


Link to post
Share on other sites

GuysNot long ago I found a VB6 example program online that draws lines to a grid data object (PictureBox Control). My knowledge of programming is real limited so this example may not be helpful but I thought I would offer something that might give you some ideas to work with.I'm sure this vb code would have to be altered greatly with also a function to write an .asm file. I hope at least it helps and I don't know who the author is. Send me an email if you'd like the complete zipped project with .vbp file it's only 3kb. BushLake@aol.comKen'Heres the vb code written to a standard exe form with 2 CheckBox Controls, 2 CommandButtons, and 1 PictureBox.'*********************************** Code Discription ******************************'This code shows how to:'Create Transparent RubberBand drawing lines'Draw single or multiple lines on a graphic object'Calculate and display a grid'Calculate or plot the nearest grid point to the current X and Y'"Snap" or draw the lines to those points''Instructions:'One left mouse click turns the line drawing on and anchors the starting point of the'line. A second click of the left button sets the end of the line.'Right clicking the mouse terminates the current Line'Turn the Snap to grid points and the multiline drawing on and off by'checking the appropriate box'***********************************************************************************Dim LineOn As Boolean, GridPix As SingleDim X1 As Single, Y1 As Single, X2 As Single, Y2 As Single, BX As Single, BY As Single'Draw GridPublic Sub DrawGrid(GridSize As Single) Dim OldDMode As Integer, OldDSize As Integer, CX As Single, CY As Single Dim GridSpan As Integer OldDMode = Document.DrawMode MousePointer = 11 DoEvents Document.DrawMode = vbInvert OldDrawSize = Document.DrawWidth Document.DrawWidth = 1 GridSpan = CInt(GridSize * 1440) CY = GridSpan CX = GridSpan For Row = 1 To Int(Document.ScaleHeight / GridSpan) For Col = 1 To Int(Document.ScaleWidth / GridSpan) Document.PSet (CX, CY) CX = CX + GridSpan Next CX = GridSpan CY = CY + GridSpan Next Document.DrawMode = OldDMode Document.DrawWidth = OldDrawSize 'GridOn = Not GridOn MousePointer = 0End SubPrivate Sub StartSnap(X As Single, Y As Single, GridSize As Single) 'Determines which grid mark is closest to x and y If (X Mod CInt(GridSize * 1440)) >= CInt(GridSize * 1440) / 2 Then X1 = (Int(X / CInt(GridSize * 1440)) + 1) * CInt(GridSize * 1440) Else X1 = Int(X / CInt(GridSize * 1440)) * CInt(GridSize * 1440) If Y Mod CInt(GridSize * 1440) >= CInt(GridSize * 1440) / 2 Then Y1 = (Int(Y / CInt(GridSize * 1440)) + 1) * CInt(GridSize * 1440) Else Y1 = Int(Y / CInt(GridSize * 1440)) * CInt(GridSize * 1440)End SubPrivate Sub EndSnap(X As Single, Y As Single, GridSize As Single) 'Determines which grid mark is closest to x and y If (X Mod CInt(GridSize * 1440)) >= CInt(GridSize * 1440) / 2 Then X2 = (Int(X / CInt(GridSize * 1440)) + 1) * CInt(GridSize * 1440) Else X2 = Int(X / CInt(GridSize * 1440)) * CInt(GridSize * 1440) If Y Mod CInt(GridSize * 1440) >= CInt(GridSize * 1440) / 2 Then Y2 = (Int(Y / CInt(GridSize * 1440)) + 1) * CInt(GridSize * 1440) Else Y2 = Int(Y / CInt(GridSize * 1440)) * CInt(GridSize * 1440)End SubPrivate Sub Command1_Click(Index As Integer) Select Case Index Case 0 Document.Cls DrawGrid GridPix Case 1 Unload Me End SelectEnd SubPrivate Sub Document_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Static BX As Single, BY As Single 'Releases last line if right mouse button is pushed If Button = 2 Then 'Erases current Line Document.Line (X1, Y1)-(X2, Y2) 'Reset line vaiables X2 = 0 Y2 = 0 LineOn = False Exit Sub End If 'If the LineOn Flag is true If LineOn Then 'Erase the Stretch Line Document.Line (X1, Y1)-(X2, Y2) 'Turn inverted draw off Document.DrawMode = 13 'If Snap2Grid checked If Snap2Grid Then 'Calculate Closest end Grid Point to X1 and Y1 EndSnap X, Y, GridPix Else X2 = X Y2 = Y End If 'Draw the final line Document.Line (X1, Y1)-(X2, Y2), RGB(0, 0, 0) 'Label1(6).BackColor 'Set new start line points If Snap2Grid Then X1 = X2 Y1 = Y2 Else X1 = X Y1 = Y End If 'If the Multi-Line checkbox is not checked reset the end line values If MLine.Value <> 1 Then X2 = 0 Y2 = 0 LineOn = False Exit Sub End If Else 'The line has not been drawn yet If Snap2Grid Then BX = X: BY = Y 'Find the closest grid point StartSnap X, Y, GridPix 'Erase the before grid point line Document.Line (X1, Y1)-(BX, BY) Else X1 = X: Y1 = Y End If 'Set end values X2 = X Y2 = Y LineOn = True End If Document.DrawMode = 6 Document.DrawStyle = 6 X3 = X: Y3 = Y: X4 = X: Y = Y4End SubPrivate Sub Document_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) 'Draw the stretch or rubberband line If LineOn Then Document.AutoRedraw = True Document.Line (X1, Y1)-(X2, Y2) X2 = X Y2 = Y Document.Line (X1, Y1)-(X, Y) Caption = "X = " & X & " Y = " & Y Else Caption = "Multi-Line" End IfEnd SubPrivate Sub Form_Load() 'Set Grid Size to 120 TWIPS between grid points GridPix = Format(120 / 1440, "##.####") 'Draw the Grid DrawGrid GridPixEnd SubPrivate Sub Form_Unload(Cancel As Integer) Set Document = Nothing EndEnd SubPrivate Sub MLine_Click() 'If the multi-line box is not checked If MLine.Value = 0 Then If LineOn Then Document.Line (X1, Y1)-(X2, Y2) 'Erase the current Line 'Reset the End line coordinates X2 = 0 Y2 = 0 'Turn off line flag LineOn = False Exit Sub End IfEnd Sub

Share this post


Link to post
Share on other sites

Rafael, many thanks for the offer, I may take it up a bit later. As things turned out, I still have a lot of programming to do! But I hope to have it all working in a few days. Then, after a bit more development I would make it available for download, so the ability to make the .exe would be useful for people who don't have VB. Many thanks. Best regards, Chris

Share this post


Link to post
Share on other sites

Chris,Just wanted to tell you that this is realy what I have been looking for and I just want to encorouge you to continue with your work.Actually, I have a lot of of map data and is just waiting for som sort of software that could turn it in to FS-compatible data (roads, lakes, terrain-data).If you make your software code available I could see if it possible to add an import routine for some standard vector formats within the GIS community (ESRI shape-files and generate files).Best regardsAnders

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