Spencer,
I think the problem with your function is that the parameters are send ByRref
not ByVal. This shoul dbe the correct structure:
Function AlterPen (ByVal o as object, ByVal p as pen) as object
Alter object o Info OBJ_INFO_PEN, p
End Function
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
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Spencer Simpson
Sent: Monday, January 09, 2006 11:23 PM
To: 'Bill Thoen'
Cc: [email protected]
Subject: RE: [MI-L] MAPBASIC: AlterObject
There was once the suggestion that you could write a function that returned an
object and use SQL Update to update all of the objects. So if you had the
function
Function AlterPen (o as object, p as pen) as object Alter object o Info
OBJ_INFO_PEN, p End function
You could then alter the pens of each of the objects in a table with
Update mytab set obj=AlterPen (obj, p)
I seem to recall trying this several years ago, and that it worked once, but I
could never get it to work again.
Hope this helps
Spencer
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bill Thoen
Sent: Monday, January 09, 2006 4:03 PM
To: Tomasz Oberski
Cc: [email protected]
Subject: Re: [MI-L] MAPBASIC: AlterObject
Tomasz Oberski wrote:
> How to change symbology of serveral mapinfo objects? The MapBasic
> AlterObject command lets to modify pen and brush of current (selected)
> object. How can I use that command to change pen and brush of several
> objects at once?Maybe there is another method of changing object's
> symbology?
You have to loop through the collection and change them one at a time.
The "collection" can either be ones you've selected manually or they can be in
a table or an SQL selection.
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l
_______________________________________________
MapInfo-L mailing list
[email protected]
http://www.directionsmag.com/mailman/listinfo/mapinfo-l