Try this...

   Dim ColorRow As Integer
   Dim ColorObj As Object

   Set Table WorkTable
      FastEdit On Undo Off
   Fetch First From WorkTable
   Do While Not EOT(WorkTable)
      ColorRow = WorkTable.RowID
      ColorObj = WorkTable.Obj
      Alter Object ColorObj
         Info OBJ_INFO_PEN, MakePen(PenWidth, PenPatt, PenColor)
      Update WorkTable
         Set Obj=ColorObj Where RowID = ColorRow
      Fetch Next From WorkTable
   Loop


----- Original Message -----
From: points <[EMAIL PROTECTED]>
To: mapinfo-l (E-mail) <[EMAIL PROTECTED]>
Sent: Sunday, August 29, 1999 9:26 AM
Subject: MI MB: Changing styles


>MB: Changing styles
>
>Hi Mappers,
>
>I have a table called STR_NEW (lines and polylines) that has a text
>field called "stylenew" containing different pen styles:
>
>Pen(1,1,32768)
>Pen (1,2,16736352)
>Pen (1,1,32768)  and so on...
>
>I need to use code to change each record's object style to
>the corresponding pen style from within the field.
>I've tried various combinations of the following to no avail:
>
>
>Sub Main
>
>Dim pen_var As Pen,
>     newobj As Object
>
>newobj=STR_NEW.obj
>pen_var = STR_NEW.stylenew
>Alter Object newobj Info OBJ_INFO_PEN,stylenew
>
>End Sub
>
>I know the solution must be simple. I really appreciate it!
>
>
>Laurence Seeff
>Points Business Mapping Ltd.
>Israel

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to