Arcmap FindField to list vb.net

2219
1
10-31-2015 07:21 AM
SigurdurGear
New Contributor

Hi

I am try to add FindField to list it work well on small area but if I zoom out and select bigger area

I get only 0 to the list not the number in the field

     Dim pMxdoc As IMxDocument

        Dim pMap As IMap

         pMxdoc = My.ArcMap.Document

        pMap = pMxdoc.FocusMap

        Dim pLayer As IFeatureLayer

        pLayer = pMap.Layer(3)

        Dim pFS As IFeatureSelection

        pFS = pLayer

        Dim pEnumFeature As IEnumFeature

        pEnumFeature = pMxdoc.FocusMap.FeatureSelection

        Dim pF As IFeature

        pF = pEnumFeature.Next

        Do Until pF Is Nothing

                     On Error Resume Next

            iList.Add(pF.Value(pF.Fields.FindField("TYPENUMBER")))

            pF = pEnumFeature.Next

        Loop

0 Kudos
1 Reply
FreddieGibson
Occasional Contributor III

From what I understand you're trying to find the values of selected fields and append them to a list. Do you have a dataset you can upload that can be used to replicate this issue? Also, can you replicate the same issue when using a search cursor with a spatial filter?

0 Kudos