Title: Message
I am attempting to create a text array of all the states, open the water boundary and tract tables from different State folders and erase the water boundary from the tracts table.
Does MapBasic not have the capability to do text arrays?
This is what I have; it is not working.
Can anyone help me?
 
'*************************************************************
'* SubRoutine: WBTracts
'* Purpose: Erase Major Water boundaries from Tracts
'*************************************************************
Sub WBTracts
Dim WaterBoundary, TractBoundary As String
Dim state(5),  Water, Tracts As String
Dim i, iCount As Integer
 
'***************************
'**State Abbreviations
'***************************
iCount = 5
Redim state(iCount)
state(1) = "AK"
state(2) = "AL"
state(3) = "AR"
state(4) = "AZ"
state(5) = "CA"
' ... and so on
 
For i = 1 to iCount
 
'********Open Tract table and save as generic "Tract" table
 
Open Table "J:\StreetPro02\"+state(i)+"\"+state(i)+"t.tab" Interactive
Commit Table selection As TractBoundary
Open Table TractBoundary As Tract Interactive
Map From AKT
 
 
'********Open WaterBoundary table and save as generic "Water" table
 
Open Table "J:\StreetPro02\"+state(i)+"\"+state(i)+"mw.tab" Interactive
Commit Table selection As WaterBoundary
Open Table WaterBoundary As Water Interactive
Add Map Auto Layer Water
 
 
set map redraw off
Set Map Order 2,1
Set Map Layer 1 Display Global Editable On
set map redraw on
select * from Tract into Selection
Set Target On
 
select * from Water into Selection
Objects Erase Into Target Data FIPS=FIPS,TRACT=TRACT,FIPS_Cnty=FIPS_Cnty
'Commit Table Tract Interactive
 
'Print "Table saved: " +state(i)
 
'Close Table Tract
'Close Table Water
 
Next
 
End Sub
 
 

 
 
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 3972


Reply via email to