How to access layers and data. C# ArcMap 10.7

605
1
06-17-2021 08:00 AM
Rconrad
New Contributor II

Hello, I am fairly new to programming for ArcMap, and need some help. I am currently making an add-in for a weed sprayer, and need to access the attribute table for selected jobs to read the area. My add-in launches inside ArcMap, but I can't figure how to actually access the data inside ArcMap. Any help with this would be greatly appreciated. Thanks. 

Rconrad_0-1623941891948.png

Rconrad_1-1623941911449.png

Rconrad_2-1623941996242.png

 

 

0 Kudos
1 Reply
DuncanHornby
MVP Notable Contributor

Sequence is this:

  1. Get a handle on IMap
  2. Get a handle of the IFeatureLayer in the IMap
  3. Create a SearchCursor which appropriate queryfilter set
  4. Step through cursor reading data

 

There are plenty of examples in the Help file and on this forum for your to review.

0 Kudos