pd.jayakumar

Printing field name and rows

Discussion created by pd.jayakumar on Jan 13, 2014
Latest reply on Jan 21, 2014 by Hornbydd
Hi,
           
IMapDocument pmd = new MapDocumentClass();

           
            if (pmd.get_IsMapDocument(@"F:/Projects/Inprogress.mxd"))
            {
                pmd.Open(@"F:/Projects/Inprogress.mxd", null);
                IMap pmap;
                  

                for (int i = 0; i <= pmd.MapCount - 1; i++)
                {
                    pmap = pmd.get_Map(0);
                    Console.WriteLine(pmap.Name);
                    for (int layerIndex = 0; layerIndex < pmap.LayerCount; layerIndex++)
                    {
                        ILayer layer = pmap.get_Layer(layerIndex);
                        IFeatureLayer FL = layer as IFeatureLayer;
                        Console.WriteLine(FL.Name);
                     }
   After this I want to print the Field names of each class and the containing attributes, how to do that in next steps.

Outcomes