Select to view content in your preferred language

ArcGIS Pro map tool how to get x,y from a point geometry

933
2
Jump to solution
09-25-2023 11:50 AM
Labels (2)
DENGD
by
Emerging Contributor

in ArcMap, we could get a map point'x X y on the below:

If pFCTraff.FindField("POINT_X") >= 0 Then

       pNewF.Value(pFCTraff.FindField("POINT_X")) = pPoint.X

       pNewF.Value(pFCTraff.FindField("POINT_Y")) = pPoint.Y

End If

 

In ArcGIS Pro Addin, OnSketchCompleteAsync(Geometry geometry) here geometry is a point. How do I get this point's x y in C#?

 

0 Kudos
1 Solution

Accepted Solutions
DuncanHornby
MVP Notable Contributor

Sounds like you want to be accessing MapPoint?

View solution in original post

0 Kudos
2 Replies
DuncanHornby
MVP Notable Contributor

Sounds like you want to be accessing MapPoint?

0 Kudos
DENGD
by
Emerging Contributor

Thank you so much !! MapPoint solved it. 

MapPoint myPoint = sketchedPoint as MapPoint;

POINT_X=myPoint.X;

POINT_Y=myPoint.Y;

0 Kudos