Hi All,
 
Me again.  I've found a way to do the looping in MapInfo without MapBasic, calling the MapBasic commands from VB and doing the rest in VB.
 
However, I have a new problem.  When I execute the code to change the symbol of a selection set, It changes the symbol style fine.  But it also changes the location of the points to the same location as the first object in the table.  It's as if the Alter Object statement has a Geography clause along with the Info clause I'm using.  I've included the code below.  I have the MapBasic Reference Guide which has a description of the MapBasic.def which is where I get the value for the OBJECT_INFO_SYMBOL code.
 
Any ideas what I'm missing.
 
----------------Code-------------
 
'this creates the object for the MapInfo Application already running
Dim miApp
Set miApp = GetObject( , "MapInfo.Application")
 
Dim miStr
miStr = "select * from OverDue where Due_Tested = ""NO BFP"" "

'miApp.do passes the commands and strings to MapInfo
miApp.do miStr
 
miApp.do "Dim bfpobj As Object"
miApp.do "Dim bfpsymbol As Symbol"
'this makes the symbol to pass to the Alter Object statement.
miApp.do "bfpsymbol = MakeSymbol(34,0,6)"
miApp.do "Fetch First From selection"
 
'MapInfo returns F if it hasn't reached the end of the selection table, so this Do While loop continues until there are no more records in the selection.
Do while miApp.Eval("EOT(selection)") = "F"
        miApp.do "bfpobj = selection.obj Alter Object bfpobj Info 2, bfpsymbol Update selection Set obj = bfpobj Fetch Next From selection"
Loop
 
Any help is appreciated.
_________________________
Don Mitchell
 
GIS Technician (IMS) 
City of St.Thomas
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l

Reply via email to