AnsweredAssumed Answered

Insert new Point to PointCollection

Question asked by HimBromBeere on Jul 11, 2013
Latest reply on Jul 11, 2013 by Hornbydd

Hey folks around,


when trying to update a features geometry by inserting a new point (using the IPointCollection-Interface) I run through an System.Runtime.InteropServices.SEHException which I can´t interpret in any way. But all posts concerning this topic simply add a new Point at the end of the geometry, but never in the middle or at the beginning.


My current code is the following:


// the candidate to add to the result-list ICurve candidate = new PathClass();   
IPointCollection curvePoints = (IPointCollection) candidate; 
// add the new point at the beginning of the geometry 
object before = curvePoints.get_Point(0); 
object after = Type.Missing; 
curvePoints.AddPoint(fromPoint, ref before, ref after);

Does anyone around know where the error is?