The following bit of code is something I use in MapBasic to get a list
of open tables (includes queries...) that I present as a choice list.
Perhaps it will inspire a way to find your layers.  You'd need to know
the names of the two states tables; by default they would be STATES and
STATES_2 but you might have altered that.

TableCount = NumTables()                        ' NumTables is built in
function that returns # of open tables
redim TableNames(TableCount+1)
Semi = ""
For LoopCount = 1 to TableCount
        TableList = TableList + Semi + TableInfo(LoopCount,
TAB_INFO_NAME)
        TableNames(LoopCount+1) = TableInfo(LoopCount, TAB_INFO_NAME)
        Semi = ";"
Next
TableNames(1) = "Selection"
TableList = "Selection;" + TableList

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Friday, January 17, 2003 2:30 PM
To: [EMAIL PROTECTED]
Subject: MI-L Getting Map Layer Names


My map has two layers from the STATES table.  In a Set Map command, I
refer 
to them by layer number.  As I add or remove layers, I need to keep
tract of 
the layer numbers.  Is there a way to refer to each STATES layer by
name?  
"STATES(1)" and "STATES(2)" give "invalid view layer".

Thanks
Mike

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


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

Reply via email to