arcobjects update mdb file geometry

1209
10
Jump to solution
02-07-2013 04:34 AM
magdaw
by
New Contributor
Hi,
I have vb.net code that works fine and updates geometry of a polyline shapefile.
What do I need to change/add to the code in order to perform similar operations on personal geodatabase *.mdb file?
Database Name= AllFeatures.mdb
Feature Dataset=LineFeatures
Feature Class = Lines

When I run this program on a mdb personal geodatabase the "Feature.Store" line of code does not work and throws an error "Items not found in this collection"
Any help or hints much appreciated.

  Do While Not id = -1                     pFeature = pFLayer.FeatureClass.GetFeature(id)                      pPolyline = pFeature.Shape                     pPointColl = pPolyline                      For lPnt = 0 To (pPointColl.PointCount - 1)                         Dim newPoint As IPoint = SetZValueOnPoint(pPointColl.Point(lPnt), Convert.ToDouble(txtZValue.Text))                         pPointColl.UpdatePoint(lPnt, newPoint)                     Next                     pFeature.Shape = pPointColl                     pFeature.Store()
0 Kudos
10 Replies
magdaw
by
New Contributor
Hi Alex,

Many thanks for your help it works now:)
I have added as you suggested a new polyline, editor.startoperation and editor.stopoperation.

Thanks!
0 Kudos