Tell me more ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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;

snappingFeedback.Update(snapResult, 0);

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?

share|improve this question

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.