Detect a pan using middle button

Detect a pan using middle button

dvertz
Collaborator Collaborator
300 Views
3 Replies
Message 1 of 4

Detect a pan using middle button

dvertz
Collaborator
Collaborator

I have this reactor set to recognized when switching to viewport.
(vlr-miscellaneous-reactor nil '((:vlr-layoutswitched . LO-changed)))

It is designed to set a variable to the scale of the viewport (or to the scale of paperspace).

However, when I pan a locked viewport, the mouse sometimes gets stuck in the pan mode. I am positive (I ran tests) it has something to do with having to swap out to PS to pan then back to MS when pan is complete, thereby running the reactor twice with each pan.

I would like to known how to detect if a pan is being performed by using the mouse middle button. I feel this would be another reactor, possibly the (vlr-mouse-reactor data callbacks). Hmm. the help file implies that middle clicks are not detected.

That makes me wonder if it would require an Express Tools Function. I seem to recall acet having a right-click detection, but I cannot seem to find it now. Or maybe its GRREAD? But then what would be returned by GRREAD to get the middle button?

 

Thanks

Civil 3D 2022,
Windows 10 Pro, x64, Nvidia Quadro P1000
Intel Core i9-11900k; 3.50GHz, 32 GB RAM, 500GB WD BLACK M.2


0 Likes
301 Views
3 Replies
Replies (3)
Message 2 of 4

CADaSchtroumpf
Advisor
Advisor

Could changing the variable "MBUTTONPAN" change the behavior?

0 Likes
Message 3 of 4

komondormrex
Mentor
Mentor

@dvertz wrote:

Or maybe its GRREAD? But then what would be returned by GRREAD to get the middle button?


nope, unfortunately grread won't intercept mid button.

0 Likes
Message 4 of 4

dvertz
Collaborator
Collaborator

CADaSchtroumpf,

I am not quit following what you are asking. I am not wanting to change what the middle button does, I want to use it for panning. I want to detect when it is pressed to make my script NOT run when the button is pressed. I wonder if "CMDNAMES" changes when a pan is done with the middle button? I bet not.

 

Civil 3D 2022,
Windows 10 Pro, x64, Nvidia Quadro P1000
Intel Core i9-11900k; 3.50GHz, 32 GB RAM, 500GB WD BLACK M.2


0 Likes