[SHOW CONVERT <in_units> <xy> <out_units>]
Returns the converted x,y coordinates from units in one specified coordinate space to units in another specified coordinate space. UNITS can be PAGE, MAP, PROJECTEDMAP, or GRAPH. The respective MAPEXTENT, MAPPROJECTION and GRAPHEXTENT must be set first.
latlong.py # get a point from NZTM and convert to lat/long # import arcgisscripting gp = arcgisscripting.create(9.3) inFeatSet = gp.GetParameter(0) gp.OverwriteOutput = True inFeatSet.Save("in_memory/pointer") row = gp.SearchCursor("in_memory/pointer","","c:/arcgis/nzgd2000.prj").next() lat = row.shape.centroid.Y long = row.shape.centroid.X gp.AddMessage(str(lat)+" "+str(long)) del row
# latlong.py # get a point from NZTM and convert to lat/long # import arcgisscripting gp = arcgisscripting.create(9.3) inFeatSet = gp.GetParameter(0) row = gp.SearchCursor(inFeatSet,"","c:/arcgis/nzgd2000.prj").next() lat = row.shape.centroid.Y long = row.shape.centroid.X gp.AddMessage(str(lat)+" "+str(long)) del row