You cannot alter objects via an update because the tool to modify objects
(Alter object..) is not a function, and thus you must have a MB application,
or run repeatedly the same statements from the MB window that would look
like
(to be run once)
dim o as object
dim i as smallint
fetch first from sele
(to be run as a block for each row of the selection)
select * from your_table where int(objectinfo(obj,20))=3 into sele
o=sele.obj
i=sele.rowid
alter object o node remove position 1,1
update sele set obj=o where rowid=i
fetch next from sele
However you are lucky because your case is simple: instead of "modifying",
you can simply do some "replacing". In the MapBasic window (or in the
appropriate requesters) you can do the following,
Select * from your_table where int(objectinfo(obj,20))=3 into sele
Update sele set obj=createline(objectnodex(obj,1,2), objectnodey(obj,1,2),
objectnodex(obj,1,3), objectnodey(obj,1,3))
Jacques Paris
e-mail [EMAIL PROTECTED]
MapBasic-MapInfo support http://www.paris-pc-gis.com
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Kjartan Greiff
Selnes
Sent: February 4, 2002 09:50
To: Mailingliste Mapinfo
Subject: MI-L
Hi list.
Is there a way to select all lines with 3 nodes in a table, and then delete
the first node.
Cant seem to find a proper way in the MI, but maybe a MapBasic command??
TIA
Regards
Kjartan Greiff Selnes
GIS-consultant - Bravida Geomatikk AS
----------------------------------------------------------------------------
----
Post: Kongens g. 35, 7713 Steinkjer Bes�k: Kongens g. 35
Dir tlf: 74 12 18 77 Fax: 74 12 18 71
Mail: [EMAIL PROTECTED] Web:www.geomatikk.no
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.