How to add attribute in featureLayer in arcgis pro .NET sdk?

431
0
07-19-2017 01:23 AM
omorfaruk
New Contributor II

I need to add fields in featurelayer. I tried  this.

var polyLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault();      
    await QueuedTask.Run(async () =>  {             
                                       var insp = new Inspector();      
                                       if (polyLayer != null)             
                                        {                
                                         for (int i = 0; i < 3; i++)                 
                                         {                      
                                           await insp.AddAttributeAsync(polyLayer as MapMember, "name" + i);
                                         }         
                                        }         
                                       });

but doesn't work. How can i solve this?

0 Kudos
0 Replies