Quantcast
Channel: Forums - ArcObjects SDKs
Viewing all articles
Browse latest Browse all 1374

layer names to text box using C#

$
0
0
Hi, I am trying get layer names to text box but i am not getting result.Here is my code
Can any one help

IMxDocument imx = m_application.Document as IMxDocument;

IMap map = imx.FocusMap;
StreamWriter sw = new StreamWriter("C:\\temp\\layer.txt");
ILayer layer =null;
// int lcount = map.LayerCount;
IEnumLayer player = map.get_Layers(null, false);
for (int i=0;i<map.LayerCount;i++)
layer = player.Next();

while (player!=null)

{

sw.WriteLine(layer.Name);
layer = player.Next();
}

}

Viewing all articles
Browse latest Browse all 1374

Trending Articles