// X, Y are the mouse coordinates, get the point on the map with Lat-Long but without Z coordinate IPoint mapPoint; mapPoint = QueryMapPoint((m_application.Document as IMxDocument).ActivatedView.ScreenDisplay, X, Y); // snap ISnappingResult snapResult = m_Snapper.FullSnap(mapPoint); if (snapResult != null) { IPoint SnappedMousePoint = snapResult.Location; // only get the XY, but Z=NaN }
Solved! Go to Solution.
Dim zAware As IZAware Set zAware = pPoint zAware.zAware = True
Hi Everybody:
I am writing some code to do snapping. When I snap a new point (with X and Y only) to an existing point feature (with XYZ coordinates). I will get the XY of the feature that it is snapped to, but not Z. Following is my current code. Is there anyway to identify the Z coordinate of the feature? For example, find the feature that is snapped to first, and then get Z?
Thank you!// X, Y are the mouse coordinates, get the point on the map with Lat-Long but without Z coordinate IPoint mapPoint; mapPoint = QueryMapPoint((m_application.Document as IMxDocument).ActivatedView.ScreenDisplay, X, Y); // snap ISnappingResult snapResult = m_Snapper.FullSnap(mapPoint); if (snapResult != null) { IPoint SnappedMousePoint = snapResult.Location; // only get the XY, but Z=NaN }