Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Check if focus is on or off DWG

Anonymous

Check if focus is on or off DWG

Anonymous
Not applicable
Hi, my name is Victor, I've been working developing on AutoCAD for a few months now. 
 
Right now I'm working on a plugin and I'm facing the challenge to know if DWG has the focus or at least if mouse pointer is over it. I know how to set to focus to the DWG but don't know how to check it. It has come to my mind to use the GetPoints() method so it will return if the focus is not on the DWG but it doesn't seem very elegant and would not be enough because if the focus is on the DWG it will not return the control until the user selects a point which we don't even need.
 
Could you provide any hint on what is the best way to accomplish this?
 
Thanks in advance.
Victor
0 Likes
Reply
477 Views
2 Replies
Replies (2)

Virupaksha_aithal
Autodesk Support
Autodesk Support

Hi,

 

see if calling "Focus" as shown https://adndevblog.typepad.com/autocad/2013/03/use-of-windowfocus-in-autocad-2014.html. This will set the focus to DWG.

 

 



Virupaksha Aithal KM
Developer Technical Services
Autodesk Developer Network

0 Likes

Anonymous
Not applicable

Hi Virupaksha.aithal,

 

 

 

0 Likes