AnsweredAssumed Answered

Obtain attribute values for a selected feature

Question asked by mrs_robbins on Jan 18, 2019
Latest reply on Jan 22, 2019 by mrs_robbins

There are several examples of clicking on a map and obtaining the layer name and it's feature count ... 

var lyrs = mv.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>();
foreach (var lyr in lyrs)
var fCnt = features.ContainsKey(lyr) ? features[lyr].Count : 0;
sb.AppendLine($@"{fCnt} {(fCnt == 1 ? "record" : "records")} for {lyr.Name}");


or using kvp.Key.Name, kvp.Value.Count


... but I have not found any examples of obtaining the attributes themselves ...


Maybe something similar to the old school way of ...

lfieldindex = pfeature.Fields.FindField("XYZfield")



I'm new programming in Pro and having a hard time finding out how to access the data for my selected feature.  In my instance it would be a single feature based off a point sketch.  Does "MapMember" play a role here?