I am trying to do snapping in arcMap at view option. I wrote the following code:
IPointSnapper pointSnapper; ISnappingEnvironment snappingEnv; ISnappingFeedback snappingFeedback; ISnappingResult snapResult;
pointSnapper = snappingEnv.PointSnapper; snapResult = pointSnapper.Snap(CurrentMouseCoordinate);
if (snapResult == null) return;
At this point, in the last line I got an exception: 'System.AccessViolationException'.
I have no clue why the exception has occured. Because snapResult is not null and contains snapResult.Description and snapResult.Location value. How can I resolve the problem?