Don,
The problem is that you update statement updates the entire table instead
of just the record you have fetched.
This should fix the problem:
miApp.do "Dim nRowID As
Integer"
...
...
Do while
miApp.Eval("EOT(selection)") = "F"
miApp.do
"bfpobj = selection.obj nRowidID = selection.ROWID Alter
Object bfpobj Info 2, bfpsymbol Update selection Set obj = bfpobj Where ROWID =
nRowID Fetch Next From
selection"
Loop
Loop
Peter Horsbøll Møller
GIS Developer, MTM
Geographical
Information & IT
COWI A/S
Odensevej
95
DK-5260 Odense S.
Denmark
Tel +45 6311 4900
Direct +45 6311 4908
Mob +45 5156 1045
Fax +45 6311 4949
E-mail [EMAIL PROTECTED]
http://www.cowi.dk/gis
"For enden af
regnbuen..." - hvordan kommer man dertil og er
det overhovedet muligt?
Læs mere om årets MapInfo konference på
www.cowi.dk/mapinfokonference
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hughes, Colleen / Don Mitchell
Sent: Thursday, September 14, 2006 9:36 PM
To: [email protected]
Subject: [MI-L] Altering Point Object Symbol
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"
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"
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"
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
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
