1

I am trying to store x-coordinates and y-coordinates of a polygon feature in a table. But, i am getting an error message: Item not found in this collection. The code is like this:

Do
 pFeature = pFeatureCursor.NextFeature  
 If Not (pFeature Is Nothing) Then  
   pPointCollection = pFeature.Shape  
   For lPnt = 0 To (pPointCollection.PointCount - 1)  
     ppolyrow = ptable.CreateRow()  
     ppolyrow.Value(coorxind) = pPointCollection.Point(lPnt).X()  
     ppolyrow.Value(cooryind) = pPointCollection.Point(lPnt).Y()  
     ppolyrow.Store()  

The error comes in this following line of code:

ppolyrow.Value(coorxind) = pPointCollection.Point(lPnt).X()  

Any help....

  • What does the error message say? – artwork21 Sep 5 '12 at 11:22
  • Thanks artwork21, ppolyrow.Value(coorxind) = Double.Parse(ppoint.X) ppolyrow.Value(cooryind)=Double.Parse(pPoint.Y) – Navish Sep 15 '12 at 9:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.