Hello Everyone,I'm using the IConstructPoint.ConstructAlong method to find a position along a poly line. I return the results as an IPoint and use that point to mark the location with a symbol.The problem is that when I use the ESRI measure tool it doesn't match the length I passed into the Construct Along method. The point seems to be approximately 7 feet off.As for code to get the point object I do a search for a feature on the poly line feature class to get the feature. I then cast the feature to ICurve and then call the Construct Along method.
featurecursor = featureclass.Search(queryfilter, false);
if (featurecursor != null)
feature = featurecursor.NextFeature();
if (feature != null)
{
ICurve curve = (ICurve)feature;
IConstructPoint2 conpnt2 = new PointClass();
conpnt2. ConstructAlong(curve, esriSegmentExtension.esriNoExtension, length, false);
IPoint point = (IPoint)conpnt2;
}
IRgbColor rgbColorWhite = new RgbColorClass();
rgbColorWhite.Red = 255;
rgbColorWhite.Green = 255;
rgbColorWhite.Blue = 255;
IPictureMarkerSymbol bitmapPictureMarkerSymbolCls = new PictureMarkerSymbolClass();
IMarkerElement markerElement = new MarkerElementClass();
bitmapPictureMarkerSymbolCls.CreateMarkerSymbolFromFile(esriIPictureType.esriIPictureBitmap, MyPicture);
bitmapPictureMarkerSymbolCls.Angle = 0;
bitmapPictureMarkerSymbolCls.Size = ((MarkerSize > 0) ? MarkerSize : 1);
bitmapPictureMarkerSymbolCls.BitmapTransparencyColor = rgbColorWhite;
bitmapPictureMarkerSymbolCls.XOffset = xoffset;
bitmapPictureMarkerSymbolCls.YOffset = yoffset;
markerElement.Symbol = bitmapPictureMarkerSymbolCls;
IElement element = (IElement)markerElement;
IElementProperties3 ep3 = (IElementProperties3)element;
element.Geometry = point;
ep3.Name = System.IO.Path.GetFileNameWithoutExtension(picFilePath);
MxDoc.ActiveView.GraphicsContainer.AddElement(element, 0);
MxDoc.ActiveView.GraphicsContainer.UpdateElement(element);
MxDoc.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);