pumskins

How to get the x and y coordinate of the selected point feature

Discussion created by pumskins on May 15, 2013
Latest reply on May 16, 2013 by jeffmatson
I need help on how to get the x and y coordinate of the selected point feature.

I have a point feature and I need to get the x,y of the selected point. Got no luck in this code.

        Dim pfcursor As IFeatureCursor
        pfcursor = pFLayer.Search(pQF, False)

        'get the first feature that matched that query
        Dim pfeature As IFeature
        pfeature = pfcursor.NextFeature
       
        Dim pgeometry As IGeometry
        pgeometry = pfeature.Shape
       
       Dim pPoint As IPoint = pgeometry

Suggestion and ideas are well appreciated. Thanks :)

Outcomes