Hi Ben, Have you considered if it's a bogus error message, so what's really wrong is that you're breaking the 32k barrier for a MB string variable ?
Or maybe if your variables Var_D2 and Var_E2 are smallints ? They need to be integers, at least in Pro 4.5+. Btw: there seems to be a small flaw in your shown code: switching from one poly to the next seems to go unnoticed !?! As far as I remember, SVG doesn't handle polygons with holes like MapInfo does. Best regards/Med venlig hilsen Lars V. Nielsen GisPro, Denmark http://www.gispro.dk/ ----- Original Message ----- From: "Ben Crane" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 26, 2004 10:16 AM Subject: MI-L MI Table to SVG: ObjectNode out of range error > Hi all, > > This email is for anyone who has put together code for > converting Tab files to SVG. I have put some code > together for converting thematic maps into SVG maps > with a legend, etc. But I have encountered a "random" > problem. Every now and again, certain Tab files > generate an ObjectNodeY: out of range/subscript error. > I have gone through the table and it appears okay and > all the nodes are joined and it is exactly the same as > other tables I've processed. I then run it again and > no problems...then again, I try to process multiple > tables and it falls over with the same error. > > The code I am using is fairly standard and I've used > it for all my SVG map apps without incident. Here is a > segment of the code where it occasionally falls over. > > Has anyone experienced this particular problem > before...the random nature of it and the fact my other > SVG apps don't suffer this problem means I'm kinda > shooting in the dark and as a programmer, frankly, I > think my code is fairly robust for the programs needs. > > For Var_D2 = 1 To > ObjectInfo(RecObject,OBJ_INFO_NPOLYGONS) > For Var_E2 = 1 To > ObjectInfo(RecObject,OBJ_INFO_NPOLYGONS+Var_D2) > f_x = ObjectNodeX(RecObject,Var_D2, Var_E2) > f_y = ObjectNodeY(RecObject,Var_D2, Var_E2) > > Newstring=""+Int(f_x-fminx)+ > chr$(44)+Int(fmaxy-f_y)+"" > AppendString = AppendString & " " & Newstring > Next > Next > > Regards > Ben > > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > --------------------------------------------------------------------- > List hosting provided by Directions Magazine | www.directionsmag.com | > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > Message number: 13077 > --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 13086
