Hi

You dont need to open all the tabels via the program, this code will update
all open tabels, the trick is then to whrite a function that alters the
object style

Declare Sub Main
Declare Function NewStyle(byval o as object, byval Code as string)as object

Sub Main
    Dim i, N as integer,
       TabName as string

    N = NumTables()
    For i = N To 1 step -1
        TabName = TableInfo(i, Tab_Info_Name)
        Update TabName Set Obj = NewStyle(Obj, Code)
        commit table tabelNavn
    Next
End sub

Function NewStyle(byval o as object, byval code as string) as object
     dim tmpObj as object

     tmpObj = o
     Do case Code
           Case "lake"
                    Alter Object  tmpObj Info ....
           Case "river"
                ......

       end Case

      newStyle = tmpObj
end function

Peter Laulund
Natioanl Survey and Cadastre, Denamrk






"Thake, Peter" <[EMAIL PROTECTED]> - 04-08-99 09:14:26

Til:    "'Matt.Wilkie'" <[EMAIL PROTECTED]>
cc:     "'Mapinfo-L'" <[EMAIL PROTECTED]> (bcc: Peter Laulund/MI/KMS)
Vedrørende:    RE: MI batch table editing



Hi Matt,

Yes, your message is getting through! Don't know an easy answer though,
other than writing a mapbasic routine to open each table in turn, make the
style changes, save the table, do the next one etc. This is not perhaps
quite as straightforward as it might seem, - you probably want to read in a
text file containing the file names and paths to properly automate the
process. You can create the text file using the dos command DIR > Text.txt,
this directs the output to a text file. You'd need reasonable knowledge of
Mapbasic do write this..

Someone out there must have done this operation before?

Pete, Ordnance Survey, UK

-----Original Message-----
From: Matt.Wilkie [mailto:[EMAIL PROTECTED]]
Sent: 04 August 1999 00:30
To: [EMAIL PROTECTED] (E-mail)
Subject: MI batch table editing


Second Call: I did not get any responses to the first post. Even
if you don't have an answer for me, if (one or two of you :)
somebody could verify my messages are getting out I'd
appreciate it. Thanks.

Hi,

What is the best method of batch editing large numbers
of identical tables?

I have a couple of hundred tables to edit to apply standard
line/region styles to. Their record structure is identical. They
can be themed by a field called "classname" which contains
a text code: lake, river, island, wetland, sandbar, etc. So a
thematic  map is possible, but laborious.

I've tried creating a Seamless Table via the Seamless Manager
tool, but it won't allow editing or creation of a thematic map
on the resultant seamless table. Seamless tables are a viable
solution for tables which only contain one object type (a
display overide can be used for all table contents).

I've tried using the "Select by Attribute" tool which selects
all objects having the same attributes as the currently selected
object. This is a great time saver, but it will still only work on
one table, and one object type, at a time.

will sum,

-matt
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]



***************************************************************
*     This email/attachment(s) has been virus checked at OS   *
*         and is free of all known viruses.
*
* All non work related emails/attachments should be deleted
*        to comply with 'Internet code of practice'
*           as per office notice 524/98.
*
***************************************************************


----------------------------------------------------------------------
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