Work in ArcGlobe and I want to calculate the coordinates of the globe latitude and longitude, but the coordinates from the mouse click is read from the screen, not the globe, because when I clicked on the corner of the screen it shows me the coordinates 0,0.

How can I make it so that coordinates read with globe and not with the screen?

import arcpy
import pythonaddins

class ToolClass2(object):
    """Implementation for coord_addin.tool (Tool)"""
    def __init__(self):
        self.enabled = True
        self.shape = "NONE" # Can set to "Line", "Circle" or "Rectangle" for interactive shape drawing and to activate the onLine/Polygon/Circle event sinks.
    def onMouseDown(self, x, y, button, shift):
        pythonaddins.MessageBox("Long" + " " + str(x) + '\n'+ "Lat"+ " " + str(y), 'Coordinates', 0)
    def onMouseDownMap(self, x, y, button, shift):
        #pythonaddins.MessageBox("Long" + " " + str(x) + '\n'+ "Lat"+ " " + str(y), 'Coordinates', 0)
    def onMouseUp(self, x, y, button, shift):
    def onMouseUpMap(self, x, y, button, shift):
    def onMouseMove(self, x, y, button, shift):
    def onMouseMoveMap(self, x, y, button, shift):
    def onDblClick(self):
    def onKeyDown(self, keycode, shift):
    def onKeyUp(self, keycode, shift):
    def deactivate(self):
    def onCircle(self, circle_geometry):
    def onLine(self, line_geometry):
    def onRectangle(self, rectangle_geometry):
  • Does it give the same results as onMouseDown...? desktop.arcgis.com/en/arcmap/latest/analyze/python-addins/…. What did you set as the coordinate system?
    – Dave X
    Commented Nov 9, 2020 at 16:31
  • no, I haven't tried onMouseDown, I'll try it now and tell you the results, I didn't set the coordinate system, it probably costs standard.
    – easyfreeze
    Commented Nov 9, 2020 at 16:40
  • I used onMouseDown and the same results are output
    – easyfreeze
    Commented Nov 9, 2020 at 16:45
  • If that was the case you probably would have noticed but could it be a missing decimal indicator or space ? (in arcglobe when I select "Degre decimal minute" as coordinate format the output look like that : 2 19,53 48 51,33 for a point near Paris France, with just a space between the degre and the decimal minute)
    – J.R
    Commented Nov 9, 2020 at 17:15
  • how to change coordinates in the add-in itself?
    – easyfreeze
    Commented Nov 9, 2020 at 18:06

1 Answer 1


Subsequent to this question you have asked what is effectively the same question multiple times as:

That question seems to distill to how to obtain 3D coordinates (or at least their X,Y values) using a Python AddIn in ArcGlobe.

Unfortunately, you are very limited in what you can do using Python AddIns in ArcGlobe because they seem to be designed with ArcMap principally in mind and I do not think what you are trying to do is possible using ArcPy with ArcGlobe.

If trying to meet your requirements using ArcGlobe is mandatory then you could try using ArcObjects instead. However, I claim no ArcObjects expertise so I think that will be difficult, even if possible.

If you are not planning to look at ArcObjects then I think you should switch your attention from ArcGlobe to the Global Scene view of ArcGIS Pro.

  • I'll try to go to ArcGIS Pro, I wanted to ask in advance if there are similar add-In like in desktop or a similar analog, so that I can also find out the results of the mouse click coordinates?
    – easyfreeze
    Commented Feb 11, 2021 at 8:19
  • @easyfreeze that should be a new question but it's previously been asked as gis.stackexchange.com/questions/130220/…
    – PolyGeo
    Commented Feb 11, 2021 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.