Select to view content in your preferred language

How to programmatically move tool cursor to certain position in ArcGIS Pro?

287
6
01-14-2025 11:43 AM
HannahBernal
Occasional Contributor

Hello,

Is it currently possible to programmatically move the tool cursor (not the system cursor) in ArcGIS Pro using the 3.3 SDK? It seems possible to do with ArcObjects by directly calling the iTool class's OnMouseMove() function but I found it is not possible to do using the ArcGIS Pro API. I see that MapView has a SetCursorPosition() function, but that moves the system cursor. I want to be able to have a separate cursor displayed in ArcGIS Pro that acts separately from the system cursor.

What I have tried so far is creating a custom map tool, passing coordinates to a new method, and displaying a graphic overlay that acts as the separate cursor. But I'm interested to know if there is a better solution.

Thank you in advance,

Hannah

6 Replies
MikeMoney
New Contributor

Hey Hannah - I am guessing this could have an ArcGIS Pro 3.4+ SDK solution as well.  You are just looking for 3.3+, right?

0 Kudos
HannahBernal
Occasional Contributor

Hi Mike,

Yes, that's correct. I'm currently using 3.3, so it would be nice to know of a 3.3+ solution. But I would be interested to know of any 3.4+ ones.

0 Kudos
HannahBernal
Occasional Contributor

Hi Charles,

Thank you for your response. I had tried those methods and see it updates the system mouse cursor's position.

It is possible to do something similar with a new cursor displayed in the scene? We are using the system cursor in our application's stereo view, but want to have a new tool cursor to mirror those mouse movements in Pro and vice vera, while connected to our application.

Thank you,

Hannah

0 Kudos
CharlesMacleod
Esri Regular Contributor

sorry, yes, i see that u did mention that in your description....am I understanding correctly that you want _two_ cursors? One is being used in "our application's stereo view" and the other, if such could be created, would be " a new tool cursor to mirror those mouse movements in Pro? - is that right?

So, Im not entirely sure but I dont think multiple cursors is supported in Windows out of the box....u wld need a 3rd party solution I am thinking. I did a quick google on "can you have two cursors on one computer" but didnt get any concrete results...

 

 

 

 

 

 

0 Kudos
HannahBernal
Occasional Contributor

Yes, that's correct, and that the new cursor in Pro only be limited to the Pro's scene and only moves from the system mouse coordinates we send over from our application to Pro. So there would be a separate cursor for each window, similar to ArcGIS Pro's Linked Cursors functionality:

HannahBernal_0-1737068498065.png

 

0 Kudos