Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Is it possible to use the new (not classic) snapping functionality when editing the vertices of a polygon feature in ArcEngine 10. I would like editing vertices to behave exactly the same as editing vertices in ArcMap.

I know that with ArcEngine you pretty much have to control everything. So when we are creating the polygon we use the following function to capture the new snapped point using the snapping feedback object.

Is there some events I can tap into that'll allow me to tap into the editing vertices and update the mouse pointer to a snapped location?

    /// <summary>
    /// Updates a point to a snapped point
    /// </summary>
    /// <param name="currentPoint"></param>
    /// <returns></returns>
    private IPoint UpdateSnappedPoint(IPoint currentPoint)
    {
        ISnappingResult snapResult = null;
        IPoint point = currentPoint;

        if (_snapEnabled && _snappingFeedBack != null)
        {
            snapResult = _snappingEnvironment.PointSnapper.Snap(point);
            _snappingFeedBack.Update(snapResult, 0);
        }

        if (snapResult != null)
            point = snapResult.Location;

        return point;
    }

Niroshan

share|improve this question

1 Answer 1

There is a great chapter in concept and samples explaining editing in ArcGIS Engine: ArcGIS Engine editing and How to work with the snap environment

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.