Creating report from selected features in ArcMap using AddIn and C#?

المشرف العام

Administrator
طاقم الإدارة
I am new to ArcGIS and I am trying to create an Add-In button which can

  1. figure out which polygons are selected and
  2. query the selected polygons to generate a report on the underlying metadata (similar to the Identify tool).
I had a look at this article, which helped with finding the selected feature layer, but I haven't been able to progress much further.

At the moment all I have is a one-liner. Here is some pseudo code of what I would like to do:

var featureLayer = ArcMap.Document.CurrentContentsView.SelectedItem as IFeatureLayer;var selectedFeatures = featureLayer.SelectedFeatures;// A list to contain the info available in Identify tool (not sure what this is called)var featuresAttributes = new List();// For each selected polygonforeach(var feature in selectedFeatures) featuresAttributes.Add(feature.Attributes);// Go off and generate some report based on the selected polygon attributesMyReportGenerator.CreateReport(featuresAttributes);

أكثر...
 
أعلى