M - This works fine for me for the Objects Split command, so I assume it will
work for Objects Intersect as well.  You have to first have code to fill the
string array Cols() with all of the column names.  Note that there is no data
disaggregation performed;  each column will retain the original value.

                Dim SplitCommand as String, ac as Integer

        SplitCommand = "Objects Split Into Target " + Chr$(10) + "Data "

        For ac = 1 to Ubound(Cols)-1
                SplitCommand = SplitCommand + chr$(10) + Cols(ac) + "=" + Cols(ac) + 
","
        Next

        SplitCommand = Left$(SplitCommand, Len(SplitCommand) -1 ) 'get rid of last
comma

        Run Command SplitCommand

Good luck.

-Tim Nuteson



<<<---------------                                                         
                  
Hello Mappers,                                                             

                                                                           

I am writing a MapBasic program that will only retain those objects (or    

parts of them) that fall within a default region. I am using the "Object   

Intersect into Target"- Statement for that.                                

I want to retain all the information in the database-columns, therefore I  

have to include the "Data"-Clause.                                         

                                                                           

The problem that I have is that I don't know the number of columns (and the

names of the columns) beforehand. Is ist possible to use a construction like

a loop within a "Data-"Clause, or are there anny other workarounds?        

                                                                           

                                                                           

Thanks a lot, M. Volberg                                                   

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