Steven,
as far as I know, there is no update command for style attributes. The
solution I use:
Go through the table, on record after the other
Copy the current object to a temporary object variable and assigen the
desired style using the alter object command
Update the current record with the temp variable
Here's an example:
Dim oCurrentObj As Object
Dim aObjCol As Alias
Dim Counter As Integer
Dim sRelation As String
Dim pNewStyle As Pen
Dim bNewStyle As Brush
...
aObjCol = sRelation + ".obj"
For Counter = 1 To TableInfo(sRelation, TAB_INFO_NROWS)
Fetch Rec Counter From sRelation 'Get
the current record,...
oCurrentObj = aObjCol
'...copy the current object...
Alter Object oCurrentObj Info OBJ_INFO_PEN, pNewStyle
'...change its pen style...
Alter Object oCurrentObj Info OBJ_INFO_BRUSH, bNewStyle
'...change its brush style...
Update sRelation Set Obj = oCurrentObj Where RowId = Counter
'...and update the current record
Next
Note: you may also use the Fetch First/Next in a Do...Loop structure, but
the update command may occasionally mess up the RowID counter. If you use
For...Next, make sure you don't have any deleted records in your table, or
pack it first.
I hope this helps,
Cheers,
Andreas
Andreas Mahn
DDS GmbH
[----------------------------------------]
Stumpfstr. 1
D - 76131 Karlsruhe
Tel.: +49-(0)-721-9651406
Fax: +49-(0)-721-9651419
http://www.dds.ptv.de
[EMAIL PROTECTED]
> -----Urspr�ngliche Nachricht-----
> Von: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
> Gesendet am: Dienstag, 11. Januar 2000 18:26
> An: [EMAIL PROTECTED]
> Betreff: MI Converting Pen and Brush Colours From within MB
>
> Hello List,
>
> Just a quick question, I have to change the colours (pen, brush, symbols)
> for over 5000 layers and want to do this from within MapBasic to make life
> a
> little easier. I can set the new brush, pen and symbol styles, but I can
> not seem to make the colours take effect. How do I go about selecting the
> all of the objects for a table and converting the desired parameter. Any
> or
> all suggestions would be greatly appreciated.
>
> Thanks a Lot
>
> Steven Hogan
> GIS Specialist
> Nagoh GIS Services
> phone (613) 990-5288
> fax (613) 996-8902
>
> ----------------------------------------------------------------------
> To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
> "unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]